The first line contains two integers $n,m(1\leq n,m\leq 10^5)$—the number of aircraft, the number of operations。
The second line contains $n$ integers $a_{1},a_{2},...,a_{n}\ (1 \le a_{i} \le 10^{5})$ —the flight distance of each aircraft.
The third line contains $n$ integers $b_{1},b_{2},...,b_{n}\ (1 \le b_{i} \le 10^{5})$ —the comfort value of each aircraft.
Each of the next m lines represent various operations. In each line the first integer is $t \ (1 \le t \le 3)$, which indicates the type of operation.
-
if t = 1, there are two integers $i$ $A'$ $(1\leq i\leq n,1\leq A'\leq 10^5)$ after $t$ and $A=A'\oplus lastans+1$.
-
if t = 2, there are two integers $i$ $B'$ $(1\leq i\leq n,1\leq B'\leq 10^5)$ after $t$ and $B=B'\oplus lastans+1$.
-
if t = 3,there are one integers $X'$ $(1\leq X'\leq 10^5)$ after $t$ and $X=X'\oplus lastans+1$.
Let $lastans$ denote the answer to the last query operation 3 and is initially zero.
If there is no aircraft that meets the need, then set lastans=0. And $\oplus$ means XOR operation.