A tree is a simple graph in which every two vertices are connected by exactly one path. You are given a rooted tree with n vertices and a lamp is placed on each vertex of the tree.
You are given q queries of the following two types:
Note: Initially, all the lamps are turned On and the tree is rooted from vertex number 1.
Input format
Note: It is guaranteed that these edges form a tree rooted from vertex 1.
Output format
For every query of type 2, print the answer in a single line.
Constraints
1≤n,q≤5×1051≤ai,bi≤n1≤ti≤21≤vi≤n
Obviously the answer now for vertex 2 is 1