Problem: You are given an array of integers.
In one operation, you will perform the following two-step move:
- Choose an integer ().
- Replace each with , where denotes the absolute value of .
For example, by choosing , the array will be changed into .
Construct a sequence of operations to make all elements of equal to in at most operations or determine that it is impossible. You do not need to minimize the number of operations.
Input Format: Each test contains multiple test cases. The first line contains a single integer () — the number of test cases. The description of test cases follows.
The first line of each test case contains a single integer () — the length of the array .
The second line of each test case contains integers () — the elements of the array .
It is guaranteed that the sum of over all test cases does not exceed .
Output Format: For each test case, output a single integer if it is impossible to make all array elements equal to in at most operations.
Otherwise, output two lines. The first line of output should contain a single integer () — the number of operations. The second line of output should contain integers () — the sequence of operations, denoting that on the -th operation, you chose .
If there are multiple solutions, output any of them.
You do not need to minimize the number of operations.
Note: In the first test case, we can perform only one operation by choosing , changing the array from to .
In the second test case, no operations are needed because all elements of the array are already .
In the third test case, we can choose to change the array from to , then choose to change it to , and finally choose again to change the array into .
In the fourth test case, we can make all elements by following the operation sequence .
In the fifth test case, it can be shown that it is impossible to make all elements in at most operations. Therefore, the output is .