You are given an integer $$$M$$$ and you have an empty array $$$a$$$. You have to process $$$q$$$ queries on array $$$a$$$, there are two types of queries :
Each test contains multiple test cases. The first line contains the number of test cases $$$t (1 \le t \le 5 \cdot 10 ^ 4)$$$. The description of the test cases follows.
The first line of each test case contains two integers $$$q$$$ and $$$M$$$ $$$(2 \le q, \ 2 \le M, \ \mathbf{q * M \le 3 \cdot 10 ^ 5})$$$.
Each of the next $$$q$$$ lines contains the description of a query in one of the following formats:
It is guaranteed that the sum of $$$\mathbf{q * M}$$$ across all test cases does not exceed $$$\mathbf{3 \cdot 10 ^ 5}$$$.
Output the answer for each query of the second type.
18 31 1 21 2 21 3 2221 2 322
3223
here is how the array $$$a$$$ changes during the queries :