You are given an undirected tree G with N nodes. Every node is assigned a value denoted by A[i].
A simple path u1−u2−u3−u4,..,−uk is said to be beautiful if the number of pairs of nodes (ui,ui+1) where A[ui] is odd and A[ui+1] is even and number of pairs of nodes (ui,ui+1) where A[ui] is even and A[ui+1] is odd are equal.
Given Q queries of the form:
Note:
Input format
Output format
For each test case in a new line, print the answer for queries in a space-separated format.
Constraints
1≤T≤101≤N,Q≤2×1051≤A[i],val≤1091≤u≤N
For the first query: