Expected Pruning


You are given a tree with nn vertices, rooted at vertex 11.

The following process is repeated until the tree is empty. Let SS be the set of vertices that still remain. Choose a vertex vv uniformly at random from SS, and delete the entire subtree of vv (including vv itself) from the remaining tree.

Let XX be the number of vertices chosen during the process. Output the expected value of XX.

It can be shown that the answer can be expressed as a rational number P/QP/Q in lowest terms with QQ coprime to 109+710^9 + 7. Output P⋅Q−1 mod (109+7)P \cdot Q^{-1} \bmod (10^9 + 7).

Input

The first line contains an integer nn.

Each of the next n−1n - 1 lines contains two integers uu and vv, describing an undirected edge of the tree.

Vertices are numbered 11 through nn. Vertex 11 is the root. If n=1n = 1, there are no edge lines.

Output

Print a single integer: the expected number of selections modulo 109+710^9 + 7.

Constraints

  • 1≤n≤1051 \le n \le 10^5
  • 1≤u,v≤n1 \le u, v \le n
  • The edges form a tree.

Example 1

Input 1
3
1 2
2 3
Output 1
833333341
Explanation

Root 11 has depth 00, vertex 22 has depth 11, and vertex 33 has depth 22. The expected number of selections is 1+1/2+1/3=11/61 + 1/2 + 1/3 = 11/6, and 11⋅6−1≡833333341(mod109+7)11 \cdot 6^{-1} \equiv 833333341 \pmod{10^9 + 7}.

These events are strongly dependent: if the root is chosen first, nothing else is ever chosen. Linearity still gives the correct expectation.

Example 2

Input 2
4
1 2
1 3
1 4
Output 2
500000006
Explanation

The root contributes 11, and each of the three leaves contributes 1/21/2, for a total of 5/25/2.

Example 3

Input 3
1
Output 3
1
Explanation

The single vertex is always chosen.

Comments0


No comments yet

Be the first to comment.

New comment


Log in to join the discussion.