Harry is participating in the Hogwarts Informatics Olympiad. There is $$$1$$$ problem with many subtasks. However, Voldemort has cast a spell on the judges, making them believe that Harry has copied in some of his submissions. To find out how Harry is doing in the competition considering Voldemort's spell, Harry will ask you $$$q$$$ queries.
The queries can be of $$$3$$$ types:
The first line contains an integer $$$t$$$, the number of cases to answer. ($$$1 \le t \le 100$$$).
The first line of each case contains an integer $$$q$$$, the number of queries that Harry asks you. $$$(2 \le q \le 2 \cdot 10^5)$$$.
The following $$$q$$$ lines contain the queries. Line $$$j$$$ contains an integer $$$type_j$$$, indicating the type of the query ($$$1 \le type_j \le 3$$$). If $$$type_j = 1$$$, it will be followed by an integer $$$k_j$$$ and $$$k_j$$$ integers $$$x_{j_1}, x_{j_2}, \ldots, x_{j_k}$$$, the subtasks that Harry solves in that submission, ($$$1 \le x_{j_i} \le 2 \cdot 10^5$$$). If $$$type_j = 2$$$, it will be followed by an integer $$$i_j$$$, the index of the query specifying the invalidated submission.
It is guaranteed that both the sum of $$$q$$$ and the sum of $$$\sum k_j$$$ over all cases are at most $$$2 \cdot 10^5$$$.
For each case, you must print the number of submissions that are increasing Harry's score for each query of type $$$3$$$ that you receive.
2101 3 3 2 531 1 31 1 22 132 332 43111 2 2 31 1 21 1 31 1 532 131 2 2 32 22 33
1 2 1 0 2 3 2
—
Problem idea: Esomer
Problem preparation: Esomer, Hectorungo18
Ocurrences: Novice 6