We have a tree with N vertices numbered 1 to N. The i-th edge in this tree connects Vertex a_i and b_i. For each k=1, ..., N, solve the problem below:

* Consider writing a number on each vertex in the tree in the following manner:
* First, write 1 on Vertex k.
* Then, for each of the numbers 2, ..., N in this order, write the number on the vertex chosen as follows:
* Choose a vertex that still does not have a number written on it and is adjacent to a vertex with a number already written on it. If there are multiple such vertices, choose one of them at random.
* Find the number of ways in which we can write the numbers on the vertices, modulo (10^9+7).

Constraints

* 2 \leq N \leq 2 \times 10^5
* 1 \leq a_i,b_i \leq N
* The given graph is a tree.

Input

Input is given from Standard Input in the following format:


N
a_1 b_1
:
a_{N-1} b_{N-1}


Output

For each k=1, 2, ..., N in this order, print a line containing the answer to the problem.

Examples

Input

3
1 2
1 3


Output

2
1
1


Input

2
1 2


Output

1
1


Input

5
1 2
2 3
3 4
3 5


Output

2
8
12
3
3


Input

8
1 2
2 3
3 4
3 5
3 6
6 7
6 8


Output

40
280
840
120
120
504
72
72
from itertools import accumulate

MOD = 10 ** 9 + 7
table_len = 2 * 10 ** 5 + 10

fac = [1, 1]
for i in range(2, table_len):
    fac.append(fac[-1] * i % MOD)
    
finv = [0] * table_len
finv[-1] = pow(fac[-1], MOD - 2, MOD)
for i in range(table_len-1, -1, -1):
    finv[i-1] = finv[i] * i % MOD


N = int(input())

adj = [[] for _ in range(N+1)]

for _ in range(N-1):
    a, b = map(int, input().split())
    adj[a].append(b)
    adj[b].append(a)


dfs_order = []
parent = [0] * (N+1)
root = 1
stack = [root]
while stack:
    node = stack.pop()
    dfs_order.append(node)
    for child in adj[node]:
        if child != parent[node]:
            parent[child] = node
            stack.append(child)

def func(t1, t2):
    size1, value1 = t1
    size2, value2 = t2
    size = size1 + size2
    comb = fac[size] * finv[size1] * finv[size2] % MOD
    value = comb * value1 * value2 % MOD
    return (size, value)
       
dp1 = [(0, 1)] * (N+1)
for node in reversed(dfs_order):
    for child in adj[node]:
        if child != parent[node]:
            dp1[node] = func(dp1[node], dp1[child])
    dp1[node] = (dp1[node][0] + 1, dp1[node][1])

dp2 = [(0, 1)] * (N+1)
for node in dfs_order:
    around = [dp1[next_node] if next_node != parent[node] else dp2[node] for next_node in adj[node]]
    from_left = [(0, 1)] + list(accumulate(around, func))[:-1]
    from_right = list(accumulate(reversed(around), func))[-2::-1] + [(0, 1)]
    without = [func(l, r) for l, r in zip(from_left, from_right)]
    for next_node, t in zip(adj[node], without):
        if next_node != parent[node]:
            dp2[next_node] = (t[0] + 1, t[1])

for t1, t2 in zip(dp1[1:], dp2[1:]):
    print(func((t1[0] - 1, t1[1]), t2)[1])