The first line has the number of vertices N. (2≤N≤100000)
Each of the next N−1 lines has the numbers u and v of the two vertices joined by one edge. (1≤u,v≤N, u=v) The N−1 edges always form a tree.
The next line has the number of queries M. (1≤M≤100000)
Each of the next M lines has one query, either 1 i or 2 v. (1≤i,v≤N)