You are given an array $$$a$$$ of $$$n$$$ integers.
The score of a subarray is defined as the bitwise XOR of the elements in this subarray.
You need to split the sequence $$$a$$$ into one or more consecutive subarrays so that each element of $$$a$$$ belongs to exactly one subarray and the bitwise OR of the scores of these subarrays is as large as possible.
For example, if $$$a=[3,4,2,5,1]$$$, then you can split the array into subarrays $$$[3,4]$$$ with score $$$3 \oplus 4 = 7$$$, and $$$[2,5,1]$$$ with score $$$2 \oplus 5 \oplus 1 = 6$$$. The bitwise OR of the scores $$$6$$$ and $$$7$$$ is $$$7$$$. This is the maximum possible score for the given array. Note that, here $$$\oplus$$$ is the bitwise XOR operator.
An array $$$c$$$ is a subarray of an array $$$b$$$ if $$$c$$$ can be obtained from $$$b$$$ by deletion of several (possibly, zero or all) elements from the beginning and several (possibly, zero or all) elements from the end.
The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10\,000$$$) — the number of test cases.
The first line of each test case contains a single integer $$$n$$$ ($$$1 \le n \le 10^5$$$).
The second line of each test case contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$1 \le a_i \le 10^5$$$).
It is guaranteed that the sum of $$$n$$$ over all test cases doesn't exceed $$$3 \cdot 10^5$$$.
For each test case, output an integer — the maximum possible bitwise OR of the scores.
2 3 6 4 8 5 3 4 2 5 1
14 7
In the first test case, the possible ways to split the array are given below:
So the maximum possible bitwise OR of the scores is $$$14$$$.
The second test case is explained in the problem statement.
| Name |
|---|


