Bagheera is getting bigger by the day; he is a big boy now. Rama always tries to get him the best food there is.
There are $$$n$$$ bags of food; the $$$i$$$-th bag has food with value $$$a_i$$$. Let's say that the value of bags she buys is the bitwise OR of food values in them.
Rama can only buy $$$n - 1$$$ bags of food, what's the maximum value of food she can buy?
The first line contains an integer $$$t$$$ $$$(1 \leq t \leq 10^3)$$$ – the number of test cases.
The first line of each test case contains an integer $$$n$$$ $$$(2 \leq n \leq 2 \cdot 10^5)$$$.
The second line of the test case contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ $$$(1 \leq a_i \leq 10^9)$$$.
For each test case, print an integer that represents the maximum value of food she can buy.
331 2 341 2 2 258 2 3 5 11
3 3 15
452 4 8 16 3272 4 8 16 32 64 12882 4 12 8 16 32 64 12881 2 4 8 16 32 64 127
60 252 254 127