Given a sequence $A_1, A_2, \ldots, A_N$ of length $N$. Write a program that processes the following queries:
1 x v: Change $A_x$ to $v$.2 k b_1 ... b_k: If the sequence $A$ can be partitioned into intervals satisfying the following conditions, output "TAK", otherwise output "NIE".- Each number belongs to exactly one interval.
- Intervals must not overlap.
- The XOR of all numbers in each interval must be equal to one of $b_1, \ldots, b_k$.
Input
The first line contains the length $N$ of the sequence. ($1 \le N \le 100{,}000$)
The second line contains $A_1, A_2, \ldots, A_N$. ($0 \le A_i < 2^{20}$)
The third line contains the number of queries $M$. ($1 \le M$)
The next $M$ lines each describe a query. ($1 \le x \le N$, $0 \le v, b_i < 2^{20}$, $1 \le k \le 5$)
The number of type 1 queries does not exceed $400{,}000$, and the total sum of $k$ over all type 2 queries does not exceed $100{,}000$.
Output
Output the results of type 2 queries.
Examples
Input 1
5 1 2 0 3 0 10 2 1 3 2 1 0 1 3 5 2 2 6 3 1 1 8 1 2 5 1 3 3 1 4 1 1 5 1 2 3 2 4 8
Output 1
TAK TAK TAK NIE