Kayzin has a list of integers, initially the list is a1,a2...an. He will execute operations.
For an operation of first type, he will select an interval[li,ri] , copy and insert it to the end of the
interval.
For an operation of second type, he wonder the -th integer of the list.
You need to print the xor sum of all the answers of second type operations.
ps: What is xor? The xor value of two integers is equal to addition in binary without carry.
输入格式
First line is an integer , indicating the number of test cases. For each test case:
First line is 2 integers , indicating the length of initial list and the number of operations.
Next line is integers , indicating the initial list.
Next line, one operation per line. The -th line could be 3 integers ( ), indicating the first type
operation, or 2 integers ( ), indicating the second type operation.
1 ≤ T ≤ 10, 1 ≤ n,q ≤ 10 ,1 ≤ a≤i109 ,∑n ≤ 10 5, ∑q ≤ 10 5,1 ≤ xi,li ,ri ≤n
the number of first type operations not exceeds .
输出格式
For each test case, print one line, indicating the xor sum of the answers.