At the first, you have a set (it contains a zero). There are three types of query:
- : Add to the set.
- : For each element like set ( means bitwise exclusive OR, More information).
- : Print the minimum of the set.
Input
The first line contains an integer ().
In the next lines, queries are given.
.
Output
For each query of the third type, print the answer.