The first line of the input contains a single integer $T$ ($1 \leq T \leq 4$), the number of test cases.
For each case, the first line of the input contains two integers $n$ and $m$ ($1 \leq n \leq 500\,000$, $1\leq m\leq 10\,000$), denoting the number of nodes and the number of operations.
The second line of the input contains $n$ integers $col_1,col_2,\dots,col_n$ ($1\leq col_i\leq n$), denoting the initial color of each node.
Each of the following $n-1$ lines contains two integers $u_i$ and $v_i$ ($1\leq u_i,v_i\leq n,u_i\neq v_i$), denoting an bidirectional edge between the $u_i$-th node and the $v_i$-th node.
Each of the next $m$ lines describes an operation in formats described in the statement above, except that some parameters are encrypted in order to enforce online processing.
Let $cnt$ be the number of queries that you answered "$\texttt{Yes}$" before in this test case. Note that $cnt$ should be reset to $0$ in each new test case. For each operation, $x,y,a,b,c$ and $d$ are encrypted. The actual values of $x,y,a,b,c$ and $d$ are $x\oplus cnt,y\oplus cnt,a\oplus cnt,b\oplus cnt,c\oplus cnt$ and $d\oplus cnt$. In the expressions above, the symbol "$\oplus$" denotes the bitwise exclusive-or operation. Also note that the constraints described in the statement above apply to the corresponding parameters only after decryption, the encrypted values are not subject to those constraints.
It is guaranteed that $f(a,b)\geq 2f(c,d)$ or $f(c,d)\geq 2f(a,b)$ always holds for each query.