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
#!usr/bin/env python3
from collections import defaultdict, deque
from heapq import heappush, heappop
from itertools import permutations, accumulate
import sys
import math
import bisect
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS():return [list(x) for x in sys.stdin.readline().split()]
def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res
def IR(n):
    return [I() for i in range(n)]
def LIR(n):
    return [LI() for i in range(n)]
def SR(n):
    return [S() for i in range(n)]
def LSR(n):
    return [LS() for i in range(n)]

sys.setrecursionlimit(1000000)
mod = 1000000007

def solve():
    def dfs(x):
        fx = ans[x]
        nf = fx*inv[s[x]-1]%mod
        sx = s[x]
        for y in v[x]:
            sy = s[y]
            nsx = sx-sy
            nsy = s[x]
            if ans[y] == None:
                fy = nf*s[y]*f[nsy-1]*pow(nsx,mod-2,mod)%mod
                ans[y] = fy
                s[x] = nsx
                s[y] = nsy
                dfs(y)
                s[x] = sx
                s[y] = sy

    n = I()
    f = [1]
    for i in range(1,n+1):
        f.append(f[-1]*i%mod)
    inv = [None]*(n+1)
    inv[n] = pow(f[n],mod-2,mod)
    for i in range(n)[::-1]:
        inv[i] = inv[i+1]*(i+1)%mod

    v = [[] for i in range(n)]
    for i in range(n-1):
        a,b = LI()
        a -= 1
        b -= 1
        v[a].append(b)
        v[b].append(a)
    d = [0]*n
    d[0] = 1
    q = deque([0])
    p = [None]*n
    while q:
        x = q.popleft()
        nd = d[x]+1
        for y in v[x]:
            if not d[y]:
                d[y] = nd
                p[y] = x
                q.append(y)
    V = list(range(n))
    V.sort(key = lambda x:-d[x])
    m = d[V[0]]
    s = [0]*n
    res = 1
    for i in V:
        j = p[i]
        s[i] += 1
        if j != None:
            s[j] += s[i]
            res *= inv[s[i]]
        if d[i] == m:
            continue
        res *= f[s[i]-1]
        res %= mod
    ans = [None]*n
    ans[0] = res
    dfs(0)
    for i in ans:
        print(i)
    return

#Solve
if __name__ == "__main__":
    solve()
