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

def cmb(n, r, mod):#コンビネーションの高速計算　
    if ( r<0 or r>n ):
        return 0
    r = min(r, n-r)
    return g1[n] * g2[r] * g2[n-r] % mod

mod = 10**9+7 #出力の制限
N = 2*10**5
g1 = [1, 1] # 元テーブル
g2 = [1, 1] #逆元テーブル
inverse = [0, 1] #逆元テーブル計算用テーブル

for i in range( 2, N + 1 ):
    g1.append( ( g1[-1] * i ) % mod )
    inverse.append( ( -inverse[mod % i] * (mod//i) ) % mod )
    g2.append( (g2[-1] * inverse[-1]) % mod )


input=sys.stdin.readline
write=sys.stdout.write

N=int(input())
hen={i:[] for i in range(1,N+1)}
for i in range(0,N-1):
    a,b=map(int,input().split())
    hen[a].append(b)
    hen[b].append(a)

parent={i:-1 for i in range(1,N+1)}
parent[1]=0
q=[]
q.append(1)
sub=[]
while q!=[]:
    while q!=[]:
        x=q.pop()
        for p in hen[x]:
            if parent[p]==-1:
                parent[p]=x
                sub.append(p)
        #何らかの操作
        #ここでsubキューに次に使うものを格納
        if q==[]:
            q=sub
            sub=[]
            break

ans={i:1 for i in range(1,N+1)}
subtreesize={i:1 for i in range(1,N+1)}
flag={i:0 for i in range(0,N+1)}
q=[]
for i in range(1,N+1):
    if i!=1 and len(hen[i])==1:
        q.append(i)


sub=[]
while q!=[]:
    while q!=[]:
        x=q.pop()
        p=parent[x]
        if p!=1:
            ans[p]=(ans[p]*ans[x]*g2[subtreesize[x]])%mod
            subtreesize[p]+=subtreesize[x]
            flag[p]+=1
            if flag[p]==len(hen[p])-1:
                ans[p]=(ans[p]*g1[subtreesize[p]-1])%mod
                sub.append(p)
        else:
            subtreesize[1]+=subtreesize[x]
            ans[1]=(ans[1]*ans[x]*g2[subtreesize[x]])%mod
            flag[1]+=1
            if flag[1]==len(hen[1]):
                ans[1]=(ans[1]*g1[subtreesize[1]-1])%mod
        #何らかの操作
        #ここでsubキューに次に使うものを格納
        if q==[]:
            q=sub
            sub=[]
            break

q=[1]
flag2={i:0 for i in range(1,N+1)}
flag2[1]=1
sub=[]
while q!=[]:
    while q!=[]:
        x=q.pop()
        for p in hen[x]:
            if flag2[p]==0:
                if len(hen[p])!=1:
                    ans[p]=(ans[x]*pow(N-subtreesize[p],mod-2,mod)*g1[subtreesize[p]]*g2[subtreesize[p]-1])%mod
                    flag2[p]=1
                    sub.append(p)
                else:
                    ans[p]=(ans[x]*pow(N-1,mod-2,mod))%mod

        #何らかの操作
        #ここでsubキューに次に使うものを格納
        if q==[]:
            q=sub
            sub=[]
            break

for i in range(1,N+1):
    write(str(ans[i])+"\n")