You are given an array consisting of elements numbered 1,2,...,n.
You can do the following operation at most once.
Choose two integers (1 \le l \le r \le n).
Let x= a_l \space \& \space a_{l+1} \space \& \space ... \space \& \space a_r.
For each integer (l \le i \le r), replace a_i by a_i \oplus x.
Find the minimum value of a_1 \space | \space a_2 \space | \space ... \space |\space a_n after doing the previous operation.
Here denotes The Bitwise OR operation while denotes The Bitwise AND operation
The first line contains a single integer (1 \le t \le 10^4) the number of test cases.
The first line of each test case contains a single integer (1\le n\le 2\cdot 10^5).
The second line of each test case contains integers (0 \le a_i < 2^{31}).
It's guaranteed that the sum of over all test cases does not exceed 2 \cdot 10^5.
For each test case, print a single integer , the minimum value of a_1 | a_2 | ... | a_n.
Example 1
In the first test case you can choose l = 2 , r = 3 , to obtain the array a = [1 , 0 , 1]
a_1 | a_2 | a_3 = 1 | 0 | 1 = 1 which is the minimum answer.
Subtask ( points): No additional constraints.