Problem: Let's call an array a_1, a_2, ..., a_m of nonnegative integer numbers good if a_1 + a_2 + ... + a_m = 2⋅(a_1 ⊕ a_2 ⊕ ... ⊕ a_m), where ⊕ denotes the [bitwise XOR operation](https://en.wikipedia.org/wiki/Bitwise_operation#XOR).

For example, array [1, 2, 3, 6] is good, as 1 + 2 + 3 + 6 = 12 = 2⋅ 6 = 2⋅ (1⊕ 2 ⊕ 3 ⊕ 6). At the same time, array [1, 2, 1, 3] isn't good, as 1 + 2 + 1 + 3 = 7 ≠ 2⋅ 1 = 2⋅(1⊕ 2 ⊕ 1 ⊕ 3).

You are given an array of length n: a_1, a_2, ..., a_n. Append at most 3 elements to it to make it good. Appended elements don't have to be different. It can be shown that the solution always exists under the given constraints. If there are different solutions, you are allowed to output any of them. Note that you don't have to minimize the number of added elements!. So, if an array is good already you are allowed to not append elements.

Input

Each test contains multiple test cases. The first line contains the number of test cases t (1 ≤ t ≤ 10 000). The description of the test cases follows.

The first line of each test case contains a single integer n (1≤ n ≤ 10^5) — the size of the array.

The second line of each test case contains n integers a_1, a_2, ..., a_n (0≤ a_i ≤ 10^9) — the elements of the array.

It is guaranteed that the sum of n over all test cases does not exceed 10^5.

Output

For each test case, output two lines.

In the first line, output a single integer s (0≤ s≤ 3) — the number of elements you want to append.

In the second line, output s integers b_1, ..., b_s (0≤ b_i ≤ 10^{18}) — the elements you want to append to the array.

If there are different solutions, you are allowed to output any of them.

Example

Input


3
4
1 2 3 6
1
8
2
1 1


Output


0

2
4 4
3
2 6 2

Note

In the first test case of the example, the sum of all numbers is 12, and their ⊕ is 6, so the condition is already satisfied.

In the second test case of the example, after adding 4, 4, the array becomes [8, 4, 4]. The sum of numbers in it is 16, ⊕ of numbers in it is 8.

Solution (in JAVA):

Solution:

import java.io.*;

import java.text.DecimalFormat;
import java.util.*;





public class Template {

	

	//static int cnt=0;
	static int max=0;
	static ArrayList<Integer> v=new ArrayList();
static Scanner sc=new Scanner(System.in);
	static BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); 
	//static boolean p=false;
	
	static ArrayList<Long> h1;
	static ArrayList<Long> h2;
	static long[][] arr;
	static long sum=0;
	public static void main (String[] args) throws java.lang.Exception{
int t=sc.nextInt();
while(t-->0)
{
	long n=sc.nextLong();
	long c=sc.nextLong();
	long sum=c;
	for(int i=1;i<n;i++) {
		
		
		long nt=sc.nextLong();
		sum+=nt;
		c=(c^nt);
	}
	System.out.println(2);
	System.out.println(c+" "+(sum+c));

}	}
/*
ArrayList<Long> ar=arrInpLong((int)n);
if(k==n) {
	System.out.println(0);
	return;
}
else if(k==1) {
	System.out.println(ar.get((int)n-1)-ar.get(0));
	return;
}
long diff=Long.MAX_VALUE;
long q=n/k;
//long rem=n%k;
ArrayList<Integer> index=new ArrayList();
for(long i=0;i<n-1;i=i+q) {
	index.add((int)i);
}
index.add((int)n-1);
for(int i=index.size()-2;i>0;i--) {
	int cindex=index.get(i);
	int pindex=index.get(i-1);
	int nindex=index.get(i+1);
	
		long init=ar.get(nindex)-ar.get(pindex+1);
		boolean exe=false;
				for(int trmp=pindex;trmp<nindex;trmp++) {
					if(ar.get(trmp)-ar.get(pindex)+ar.get(nindex)-ar.get(trmp+1)<=init) {
						
						init=ar.get(trmp)-ar.get(pindex)+ar.get(nindex)-ar.get(trmp+1);
						if(!exe && trmp==nindex-1) {
						index.set(i,(int)trmp);
						//sum+=init;
						}
						continue;
					}
					else {
						exe=true;
						trmp--;
						System.out.println(trmp);
               index.set(i, (int) trmp);
               
               System.out.println(ar.get(index.get(i+1))-ar.get(trmp+1));
						//sum+=ar.get(index.get(i+1))-ar.get(trmp+1);
			break;
					
				}
					
					

				
				}
				
}
System.out.println(index);
for(int j=0;j<index.size();j=j+2) {
	try {
		sum+=ar.get(index.get(j+1))-ar.get(index.get(j));
	}
	catch(Exception e) {
		
	}
}

System.out.println(sum);
	}
	/*if(op>cl && s.charAt(0)!=')') {
		int diff=op-cl;
		//if(open.containsKey(diff)) {
			//open.put(diff, open.get(diff)+1);
		//}
		//else {
			//open.put(diff,1);
			
		//}
		System.out.println(n);
		ar.add(diff);
	}
	
	else if(cl>op && s.charAt(s.length()-1)!='(') {
		
		int diff=cl-op;
		if(close.containsKey(diff)) {
			close.put(diff, close.get(diff)+1);
		}
		else {
			close.put(diff,1);
			
		}
		System.out.println(n);
		
	}
	else if(cl==op && s.charAt(0)!=')' && s.charAt(s.length()-1)!='('){
		count++;
	}
	
	
	


count=count/2;
	//System.out.println(ar);
	//System.out.println(close);
	//System.out.println(count);
	for(int i=0;i<ar.size();i++) {
		if(close.containsKey(ar.get(i))) {
			if(close.get(ar.get(i))>=1) {
				close.put(ar.get(i),close.get(ar.get(i))-1);
				count++;
			}
		}
	}
		
		System.out.println(count);



	}
	
	
	
	*/
		
	
	
	
	
	
	public static long fact(long i) {
	long fact=1;
		for(int j=2;j<=i;j++) {
			fact=fact*j;
		}
		return fact;
	}
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	public static void printArrInt(ArrayList<Integer> arr) {
		for(int i=0;i<arr.size();i++) {
			System.out.print(arr.get(i)+" ");
	}	
		}
	
	public static int[][] matrixInp(int n,int m) {
		int[][] arr=new int[n][m];
		for(int i=0;i<n;i++) {
			for(int j=0;j<m;j++) {
				arr[i][j]=sc.nextInt();
			}
		}
		return arr;
	}
	
	
	
	
	
	
	public static int bSearch(ArrayList<Long> arr,long n) {
		
		int start=0;
		int end=arr.size()-1;
		int mid=0;
		while(end>=start) {
		mid=start+(end-start)/2;
		if(arr.get(mid)==n) {
			break;
			
		}
		else if(arr.get(mid)>n) {
			end=mid-1;
		}
		else if(arr.get(mid)<n) {
			start=mid+1;
		}
		}
		return mid;
	}
	

	
	public static int reduceFraction(int a, int b)
	{
		int aa=a;
		if(a==0 || b==0)
			return Math.max(a, b);
		else {
			for(int i=2;i<=Math.min(a, b);i++) {
				if(a%i==0 && b%i==0) {
					a=a/i;
					b=b/i;
					i--;
				}
			}
			
			
		}
		
		return aa/a;
	}
	
	public static long sumDigits(long x) {
		String s=String.valueOf(x);
		//System.out.println(s+" "+sx+" "+x);
		long sum=0;
		for(int i=0;i<s.length();i++) {
			sum+=Long.parseLong(s.substring(i,i+1));
		}
		return sum;
	}
	
	
	public static int[] primeFactofNumb(int num) {
		int[] factors=new int[num+1];
		for(int j=2;j<=Math.sqrt(num);j++) {
			if(num%j==0) {
				factors[j]++;
			}
			while(num%j==0) {
				num=num/j;
			}
			
		}
		
		if(num>1)
			factors[num]++;
		return factors;
	}
	
	
	
	
	public static long nCr(int n, int k){ 
		long C[][] = new long[n + 1][k + 1];
        long i, j;
 
        // Calculate  value of Binomial
        // Coefficient in bottom up manner
        for (i = 0; i <= n; i++) {
            for (j = 0; j <= (long)Math.min(i, k); j++) {
                // Base Cases
                if (j == 0 || j == i)
                    C[(int) i][(int) j] = 1;
 
                // Calculate value using
                // previously stored values
                else
                    C[(int) i][(int) j] = C[(int) (i - 1)][(int) (j - 1)] + C[(int) (i - 1)][(int) j];
            }
        }
 
        return C[n][k];
	}
		
	
		
	

	
	
	

		
	
	
	
	
static long gcd(long a,long b) {
		
	
		if(b==0) {
		return a;
		}
		else if(a==0)
			return b;
			
		
	return gcd(b,a%b);
	
	}
	
	
	
	
	
	public static int s2i(String s) {
		return Integer.parseInt(s);
	}
	

	
	
	public static int LeastIntFn(int a,int b) {
		if((b%a)==0) {
			return (int)b/a;
		}
		return (int)(b/a)+1;
	}
	
	
	
	public static ArrayList<Long> arrInpLong(long n){
		ArrayList<Long> arr=new ArrayList();
		for(long i=0;i<n;i++) {
		arr.add(sc.nextLong());	
		}
		return arr;
	}
	public static ArrayList<String> arrInpStr(int n){
		ArrayList<String> arr=new ArrayList();
		for(int i=0;i<n;i++) {
					arr.add(sc.nextLine());	
		}
		return arr;
	}
	
	public static ArrayList<Integer> arrInpInt(int n){
		ArrayList<Integer> arr=new ArrayList();
		for(int i=0;i<n;i++) {
			int k=sc.nextInt();
			if(k>max)
				max=k;
		arr.add(k);	
		}
		return arr;
	}
	
	

	
	
	public static int min(int a,int b,int c) {
		int min1=Math.min(a, b);
		return Math.min(min1,c);
	}
}