Woohyeon is moving around on a tree. The tree has vertices, and vertex is the root. Initially, Woohyeon is at vertex .
Some vertices are chosen by Woohyeon. Thus, each vertex is in one of two states: selected or not selected.
Woohyeon is given queries of the following types.
Here, a descendant of vertex is any vertex from which can be reached by moving toward the root zero or more times. In particular, vertex is its own descendant.
Woohyeon is too busy moving around the tree to process the queries. Help him process them all!
The first line contains and , separated by a space. ()
The second line contains . means vertex is initially selected, and means it is initially not selected. ()
For each query of type , print the answer on its own line.
-1Each of the next lines describes an edge. The -th of these lines contains , meaning that vertices and are connected by an edge of length . (, )
Each of the next lines contains one query, represented by one or two space-separated integers. For queries of type or , .