The first line of input contains only one integer T (1≤T≤10), denoting the number of test cases.
For each test case, the first line consists of only one integer n (1≤n≤106), denoting the number of events. Then follow n lines, each describing an event. For an event of type 1, the line contains three integers 1,x,y (|x|,|y|≤106), where (x,y) is the Cartesian coordinates of the person; for an event of type 2, the line contains only two integers 2,i, where i is the index of the event since which the person appears.
It is guaranteed that, for each event of type 2, the person does exist at the moment of the event. It is also guaranteed that after each event, there is at least one person in the center. It is possible that multiple persons are located in the same coordinates.
The sum of n in all test cases is less than 3000000.