#P1017G. The Tree
The Tree
No submission language available for this problem.
Description
Abendsen assigned a mission to Juliana. In this mission, Juliana has a rooted tree with vertices. Vertex number is the root of this tree. Each vertex can be either black or white. At first, all vertices are white. Juliana is asked to process queries. Each query is one of three types:
- If vertex is white, mark it as black; otherwise, perform this operation on all direct sons of instead.
- Mark all vertices in the subtree of (including ) as white.
- Find the color of the -th vertex.

Can you help Juliana to process all these queries?
The first line contains two integers and (, ) — the number of vertices and the number of queries.
The second line contains integers (), where means that there is an edge between vertices and .
Each of the next lines contains two integers and (, ) — the type of the -th query and the vertex of the -th query.
It is guaranteed that the given graph is a tree.
For each query of type , print "black" if the vertex is black; otherwise, print "white".
Input
The first line contains two integers and (, ) — the number of vertices and the number of queries.
The second line contains integers (), where means that there is an edge between vertices and .
Each of the next lines contains two integers and (, ) — the type of the -th query and the vertex of the -th query.
It is guaranteed that the given graph is a tree.
Output
For each query of type , print "black" if the vertex is black; otherwise, print "white".
Samples
Note
The first example is shown on the picture below.

The second example is shown on the picture below.
