G. Find The Array
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

You are given four integers $$$a, b, c,d$$$. Find any array satisfying those 4 conditions :

  1. The maximum of its prefix sum array is $$$a$$$.
  2. The minimum of its its prefix sum array is $$$b$$$.
  3. The maximum of its suffix sum array is $$$c$$$.
  4. The minimum of its suffix sum array is $$$d$$$.
The prefix sum array of an array $$$a[1..n]$$$ of size $$$n$$$ is an array of size $$$n+1$$$ defined as follow :
  • $$$\text{Pr}[1] = 0$$$
  • $$$\text{Pr}[i] = \sum_{k=1}^{i-1} a[k]$$$ for all $$$2 \le i \le n+1$$$

The suffix sum array of an array $$$a[1..n]$$$ of size $$$n$$$ is an array of size $$$n+1$$$ defined as follow :

  • $$$\text{Sf}[n+1] = 0$$$
  • $$$\text{Sf}[i] = \sum_{k=i}^{n} a[k]$$$ for all $$$1 \le i \le n$$$
Input

The first line contains one integer $$$t$$$ $$$( 1 \le t \le 10^3)$$$ — the number of test cases.

Each test case contains 4 integers $$$a,b,c,d$$$ $$$(-10^9 \le a,b,c,d \le 10^9)$$$

Output

For each test case :

  • Output $$$k$$$ $$$(1 \le k \le 1000)$$$ : The size of the array
  • Then, output an array $$$a$$$ of size $$$k$$$ $$$(-2.10^9 \le a[i] \le 2.10^9)$$$ : Any array satisfying the conditions above.

If there is no answer output $$$-1$$$.

Example
Input
2
4 0 2 -3
6 -5 10 -1
Output
-1
8
3 -8 6 2 -1 4 -6 5
Note

In the second test case, the prefix sum array is : $$$[0,3,-5,1,3,2,6,0,5]$$$ and the suffix sum array is : $$$[5,2,10,4,2,3,-1,5,0]$$$.