You are given a tree G with N nodes rooted at node 1. We need to assign values to each node as follows:-
Find the number of valid assignments that are possible for a given tree G . Since this number can be very large, print it modulo 109+7.
Two assignments are said to be different if there exists at least one node with different values assigned.
Input format
Output format
For each test case in a new line, print the number of valid assignments modulo 109+7.
Constraints
1≤T≤102≤N≤1031≤X≤109