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
import sys
input = sys.stdin.readline

from collections import deque

class Factorial:
    def __init__(self, n, mod):
        self.f = [1]
        self.mod = mod
        for j in range(1, n + 1):
            self.f.append(self.f[-1] * j % mod)
        self.i = [pow(self.f[-1], mod - 2, mod)]
        for j in range(n, 0, -1):
            self.i.append(self.i[-1] * j % mod)
        self.i.reverse()
    def factorial(self, j):
        return self.f[j]
    def ifactorial(self, j):
        return self.i[j]
    def comb(self, n, k):
        return self.f[n] * self.i[n - k] % self.mod * self.i[k] % self.mod if n >= k else 0


MOD = 10 ** 9 + 7


N = int(input())

c = Factorial(N + 2, MOD)

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

edge_num = [len(G[i]) for i in range(N + 1)]

que = deque()
check = [0] * (N + 1)
order = []
o_append =order.append
q_pop = que.pop
q_append = que.append

q_append((1, 0))
check[1] = 1
while que:
    now = q_pop()
    o_append(now)
    for next_ in G[now[0]]:
        if check[next_] == 0:
            q_append((next_, now[0]))
            check[next_] = 1

# print (order)

size1 = [0] * (N + 1) #自身を頂点とする部分木のサイズ、木の根は頂点0
dp1 = [1] * (N + 1)
for child, parent in order[::-1]:
    dp1[child] *= c.factorial(size1[child])
    dp1[child] %= MOD
    s = size1[child] + 1
    size1[parent] += s
    dp1[parent] *= c.ifactorial(s) * dp1[child]
    dp1[parent] %= MOD

# print (size1)
# print (dp1)

size2 = [N - 2 - x for x in size1]
dp2 = [1] * (N + 1)

# print (size1)
# print (size2)
for child, parent in order[1:]:
    x = dp1[parent]
    x *= dp2[parent]
    x *= c.ifactorial(size1[parent])
    x *= c.factorial(size1[child] + 1)
    x *= pow(dp1[child], MOD - 2, MOD) #割り算
    x *= c.factorial(size2[child])
    x *= c.ifactorial(size2[parent] + 1)
    dp2[child] = x % MOD

# print (dp2)

for x1, x2, s1, s2 in zip(dp1[1:], dp2[1:], size1[1:], size2[1:]):
    s2 += 1
    x = x1 * x2 * c.factorial(s1 + s2) * c.ifactorial(s1) * c.ifactorial(s2) % MOD
    print (x)