You are given $N$ non-negative integers $A_1,A_2,\cdots,A_N$. For each $k=1,2,\cdots,N$, solve the following problem.
Alice and Bob play the following game.
* Alice chooses $k$ numbers from $A_1,A_2,\cdots,A_N$. Let $x_1,x_2,\cdots,x_k$ be the chosen numbers (in arbitrary order).
* Bob makes a sequence of $2k$ non-negative integers $y=(y_1,y_2,\cdots,y_{2k})$, which must satisfy the following conditions.
* $0 \leq y_1 \leq y_2 \leq \cdots \leq y_{2k}$.
* Let $z_i=y_{2i-1} \oplus y_{2i}$. Then, ${z_1,z_2,\cdots,z_k}$ coincides with ${x_1,x_2,\cdots,x_k}$ as a multiset.
Here, $\oplus$ denotes bitwise $\mathrm{XOR}$.
Let the **score** of the game be the value of $y_{2k}$. Bob plays to minimize the score. With this in mind, Alice plays to maximize the score. What will the score be?
What is bitwise $\mathrm{XOR}$?The bitwise $\mathrm{XOR}$ of non-negative integers $A$ and $B$, $A\ \mathrm{XOR}\ B$, is defined as follows.
* When $A\ \mathrm{XOR}\ B$ is written in binary, the $k$\-th lowest bit ($k \geq 0$) is $1$ if exactly one of the $k$\-th lowest bits of $A$ and $B$ is $1$, and $0$ otherwise.
For instance, $3\ \mathrm{XOR}\ 5 = 6$ (in binary: $011\ \mathrm{XOR}\ 101 = 110$).
Generally, the bitwise $\mathrm{XOR}$ of $k$ non-negative integers $p_1, p_2, p_3, \dots, p_k$ is defined to be $(\dots ((p_1\ \mathrm{XOR}\ p_2)\ \mathrm{XOR}\ p_3)\ \mathrm{XOR}\ \dots\ \mathrm{XOR}\ p_k)$, which one can prove to be independent of the order of $p_1, p_2, p_3, \dots p_k$.
## Constraints
* $1 \leq N \leq 250000$
* $1 \leq A_i \leq 10^9$
* All input values are integers.
## Input
The input is given from Standard Input in the following format:
$N$
$A_1$ $A_2$ $\cdots$ $A_N$
[samples]