You are given a tree consisting of N nodes, each node i has a value a[i] (0 ≤ a[i] ≤ 1) associated with it.
We call a set S of tree nodes beautiful if following conditions are satisfied:
Your task is to count the number of beautiful sets. Since the answer may very large, you should print it modulo 109 + 7.
Input
The first line contains one integer T - the number of test cases. Then T test cases follow.
Each test case consists of several lines.
Output
For each test, print the answer in one line.
Constraints