There is an array $A$ that contains a single $0$. Then, the following queries need to be executed:
1 x: Add $x$ to $A$.2 x: Remove $x$ from $A$. If $A$ contains two or more copies of $x$, remove only one. It is guaranteed that $x$ exists in $A$ when this query is executed.3 x: For each element in $A$, perform a bitwise XOR with $x$, then output the maximum value among them.
Input
The first line contains an integer $M$ $(1 \le M \le 200{,}000)$, the number of queries. The next $M$ lines each describe one query. All $x$ given in the input are non-negative integers not exceeding $10^9$.
Query type 3 appears at least once.
Output
Output the results of the queries in order.
Examples
Input 1
10 1 8 1 9 1 11 1 6 1 1 3 3 2 8 3 3 3 8 3 11
Output 1
11 10 14 13