#1426. Play on Tree

Play on Tree

Trees are very interesting, so playing on them is also very interesting. One day, Satono Diamond and Kitasan Black were playing a game on a tree.

First, Satono Diamond selected a point as the root of the tree.

Then Kitasan Black began the game. Each round selected a node xx and deleted it and its subtree.

Whoever deleted the root node lost.

Kitasan Black wanted to know if she could win, but she didn't know which root node it was, so she assumed that the root node was randomly selected by Satono Diamond.Please tell her the probability of winning.

Please output it modulo 109+710^9 + 7.

Input

The input consists of multiple test cases. The first line contains a single integer TT(1T51 ≤ T ≤ 5) — the number of test cases.

The first line of each test case contains one integer nn (1n21051 ≤ n ≤ 2 \cdot 10^5) — the number of nodes in the tree.

Each of the next n1n − 1 lines contains two integers uu, vv (1u,vn,uv1 ≤ u, v ≤ n, u \ne v)

Output

For each query, output an integer in a single line indicating the probability of winning.

Example

2
2
1 2
3
1 2
1 3
1
666666672

Limitation

Time limit: 2 second

Memory limit: 512 megabytes