Question
The Minimum XOR
You have N integers - A1, A2, A3, .... An. You have to make the Bitwise XOR of all the elements as minimum as possible.
You are allowed to remove at most one element. Note that this means that you can also choose to not remove any element.
What is the final minimum XOR that you can achieve after removing at most one element?
Note: In most programming languages, the XOR of two variables x and y can be computed using x ^ y.
Input
The first line of the input contains a single integer T, denoting the number of test cases.
Each test case consists of two lines of input.
The first line of each test case contains an integer N - the number of elements.
The next line contains N space-separated integers.

Constraints
1 ≤ T ≤ 105
1 ≤ N ≤ 105
1 ≤ Ai ≤ 105
Note: Sum of N over all test cases ≤ 3x105
Output
For each test case, output on a new line the final minimum XOR of the elements.
Example
Sample Input
3
4
2 4 3 6
2
4 4
5
1 3 5 17 9
Sample Output
0
0
14
Explanation
Test case 1: The bitwise XOR of all elements {2, 4, 3, 6} is 3. If we remove the element 3, the total XOR of the remaining elements becomes 0 which is minimum possible XOR.
Test case 2: The bitwise XOR of all elements {4, 4} is 0. This is already the minimum possible total XOR, and so we will not remove any element.

Online