There are multiple test cases. The first line of the input contains an integer T (1 ≤ T ≤ 10000), indicating the number of test cases. For each test case:
The first line contains three integers n, m and s (1 ≤ n, m, s ≤ 108).
For each test case, output the answer modulo (109+7).