Given a non-negative 32-bit integer, initially all bits of this number are '0'. There are three types of queries:
- `1 k`: Set the $k$-th bit (i.e., assign the $k$-th bit to '1').
- `2 k`: Reset the $k$-th bit (i.e., assign the $k$-th bit to '0').
- `3 k`: Flip the $k$-th bit (i.e., change '0' to '1' and vice versa).
Determine the integer after each query.
### Input
- The first line contains an integer $q$.
- The next $q$ lines each contain a query in the specified format.
### Output
- After each query, print the resulting integer.
### Constraints
- $1 \le q \le 10^5$.
- $0 \le k \le 31$.
### Example
Input:
```
5
1 0
1 1
2 0
3 1
3 3
```
Output:
```
1
3
2
0
8
```