You are given an array \(A\) consisting of \(N\) non-negative integers. Find out the minimum number \(K\) such that there exists a non-empty subset of \(A\) for which the bitwise OR of all its elements is equal to \(K\).
Input format
Note: It is guaranteed that sum of \(N\) over all test cases is less than or equal to \(2 \times 10^5\).
Output format
For each test case, print a line containing the minimum possible value of \(K\).
Constraints
\(1 \leq T \leq 1000\)
\(1 \leq N \leq 2 \times 10^5\)
\(0 \leq A_i < 2^{31} \)
Sum of \(N\) over all test cases is less than or equal to \(2 \times 10^5\)