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
class Combination:
    def __init__(self, size, mod=10**9 + 7):
        self.size = size + 2
        self.mod = mod
        self.fact = [1, 1] + [0] * size
        self.factInv = [1, 1] + [0] * size
        self.inv = [0, 1] + [0] * size

        for i in range(2, self.size):
            self.fact[i] = self.fact[i - 1] * i % self.mod
            self.inv[i] = -self.inv[self.mod % i] * (self.mod // i) % self.mod
            self.factInv[i] = self.factInv[i - 1] * self.inv[i] % self.mod

    def npr(self, n, r):
        if n < r or n < 0 or r < 0:
            return 0
        return self.fact[n] * self.factInv[n - r] % self.mod

    def ncr(self, n, r):
        if n < r or n < 0 or r < 0:
            return 0
        return self.fact[n] * (self.factInv[r] * self.factInv[n - r] % self.mod) % self.mod

    def nhr(self, n, r):  # 重複組合せ
        return self.ncr(n + r - 1, n - 1)

    def factN(self, n):
        if n < 0:
            return 0
        return self.fact[n]

N = int(input())
MOD = 10**9 + 7
comb = Combination(N + 100)

edges = [[] for _ in range(N + 1)]
for _ in range(N - 1):
    fr, to = map(int, input().split())
    edges[fr].append(to)
    edges[to].append(fr)

parent = [0] * (N + 1)
order = []
st = [1]
while st:
    now = st.pop()
    order.append(now)
    for to in edges[now]:
        if to == parent[now]:
            continue
        st.append(to)
        parent[to] = now

size = [1] * (N + 1)
for v in order[::-1]:
    size[parent[v]] += size[v]

dp = [1] * (N + 1)
for v in order[::-1]:
    dp[v] = dp[v] * comb.fact[size[v] - 1] % MOD
    dp[parent[v]] *= dp[v] * comb.factInv[size[v]]

ans = [1] * (N + 1)
dpL = [[] for _ in range(N + 1)]
dpR = [[] for _ in range(N + 1)]
eToI = [{to: i for i, to in enumerate(edges[v])} for v in range(N + 1)]

for v in order:
    pr = parent[v]
    M = len(edges[v])
    L = [1] * (M + 1)
    R = [1] * (M + 1)

    for i, to in enumerate(edges[v]):
        if to == pr:
            j = eToI[pr][v]
            L[i + 1] = L[i] * dpL[pr][j] * dpR[pr][j + 1] * comb.fact[N - size[v] - 1] * comb.factInv[N - size[v]] % MOD
        else:
            L[i + 1] = L[i] * dp[to] * comb.factInv[size[to]] % MOD
    for i, to in enumerate(edges[v][::-1]):
        if to == pr:
            j = eToI[pr][v]
            R[i + 1] = R[i] * dpL[pr][j] * dpR[pr][j + 1] * comb.fact[N - size[v] - 1] * comb.factInv[N - size[v]] % MOD
        else:
            R[i + 1] = R[i] * dp[to] * comb.factInv[size[to]] % MOD

    dpL[v] = L
    dpR[v] = R[::-1]
    ans[v] = R[-1] * comb.fact[N - 1] % MOD

print(*ans[1:], sep='\n')