The first line of input contains an integer T (1 <= T <= 5) denoting the number of test cases.
The first line of each test case contains two integers N and Q (1 <= N, Q <= 100000), the number of vertices in the given tree and the number of queries respectively. Each of the next N - 1 lines contains two integers u and v, representing that there exists an edge between vertex u and v.
The next line contains N space-separated integers and the i-th integer denotes the color of vertex i.
Then Q lines followed and each line consists of one of two types of queries.