You are given a directed rooted tree T with N vertices (N ≤ 105). The vertices are numbered from 1 to N, with vertex 1 being the root. You must perform Q queries of two types on the tree (Q ≤ 105):
The pre-order tree traversal can be explained by this pseudo-code and figure. 
The first line of input contains the only integer T - number of test cases (T ≤ 10). Then T tests follow. For each test case:
For each query of type , print one line containing the only integer - the answer of the query.
1
7
1 3
1 2
3 5
3 4
2 6
2 7
15
2 1
2 2
2 3
2 4
2 5
2 6
2 7
1 3 2
2 1
2 2
2 3
2 4
2 5
2 6
2 7
1
3
5
4
2
6
7
1
2
6
7
3
5
4
The query type 2 in example can be explained by the following figure: 