You are given a tree (undirected) with N nodes. Each node has a value Ai (1≤i≤N) associated with it.
You can delete a subset (including none) of the edges from this tree such that the following conditions hold:
Find the value of X modulo 109+7.
Note: XOR of a component is defined as the XOR of the values associated with all the nodes in that component.
Input
Constraints
Output
Remove the edge between 2 and 3. This results in 2 components, each having xor sum as 3.