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
MOD = 10 ** 9 + 7
fac = [1] * (2 * 10 ** 5 + 10)
for i in range(len(fac) - 1):
    fac[i + 1] = fac[i] * (i + 1) % MOD


def euler_tour(G, root=0):
    n = len(G)
    euler = []
    dq = [root]
    visited = [0] * n
    while dq:
        u = dq.pop()
        euler += [u]
        if visited[u]:
            continue
        dq += [u]
        for v in G[u]:
            if visited[v]:
                continue
            # [親頂点、子頂点、子頂点、。。。]と入れていく.その後連結
            else:
                dq += [v]
        visited[u] = 1
    return euler


n = int(input())
g = [[] for _ in range(n)]
for _ in range(n - 1):
    a, b = map(int, input().split())
    g[a - 1].append(b - 1)
    g[b - 1].append(a - 1)
e = euler_tour(g)
pr = [-1] * n
d = [0] * n
for i, x in enumerate(e):
    if pr[x] == -1:
        pr[x] = i
    else:
        d[x] = (i - pr[x]) // 2
s = [0]
p = [0] * n
v = [0] * n
for node in e:
    if v[node]:
        for t in g[node]:
            if d[t] <= d[node]:
                p[node] = p[node] * \
                    pow(fac[d[t] + 1], MOD - 2, MOD) * p[t] % MOD
    else:
        v[node] = 1
        p[node] = fac[d[node]]
s = [0]
ans = [0] * n
ans[0] = p[0]
while s:
    p = s.pop()
    for node in g[p]:
        if not ans[node]:
            ans[node] = ans[p] * (d[node] + 1) * \
                pow(n - d[node] - 1, MOD - 2, MOD) % MOD
            s.append(node)
for row in ans:
    print(row)
