# Prefix & Suffix Maximization

RUET CodeSmash 2020
Limits 1s, 256 MB

You are given an array $a$ of $n$ integers. Now, let’s define two variables $P$ and $S$. Where $P$ is the bitwise XOR value of all elements for any non-empty prefix. And $S$ is the bitwise XOR value of all elements for any non-empty suffix. Now find the maximum value of $(P \& S)$. Where $\&$ denotes the bitwise AND operation.

Note that, the sum of the length of chosen prefix and suffix has to be less than or equal to $n$.

## Input

The first line of the input contains one integer $n \ (2≤n≤10^6)$ denoting the number of elements of the array.

The next line contains n space-separated integers $a_1 ​ ,a_2 ​ ,…,a_n ​ (1≤a_i ​≤10^9 )$ denoting the elements of the array.

## Output

Print the maximum value of $(P \& S)$ as described in the statement.

## Samples

InputOutput
2
12 12

12

InputOutput
4
2 4 2 4

6