The first line contains an integer $T(T \leq 10)$, denoting the number of testcases.
For each test case, the first line contains two integers $n$ and $m(1 \leq n \leq 10 ^ 5, 1\leq m \leq 10^6 )$, representing the length of sequence $a$ and the number of operations.
The following line contains $n$ integers denoting the sequence $a(1\leq a_i\leq 10^9)$.
The last line contains $m$ integers representing the sequence of operations. Let $c_i$ be the $i$th number in this sequence, it means the type of $i$th operation is $c_i(1\leq c_i \leq 3)$.
It is guaranteed that $\sum n \leq 2.1 \times 10^5, \sum m \leq 2.1 \times 10^6 $.