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
mod = 10**9+7
rng = 200100
fctr = [1]
finv = [1]
for i in range(1,rng):
  fctr.append(fctr[-1]*i%mod)
n = int(input())
ab = [list(map(int,input().split())) for i in range(n-1)]
graph = [[] for i in range(n+1)]
deg = [0]*(n+1)
for a,b in ab:
  graph[a].append(b)
  graph[b].append(a)
  deg[a] += 1
  deg[b] += 1
deg[1] += 1
stack = [1]
cnt = [0]*(n+1)
for i in range(2,n+1):
  if deg[i] == 1:
    stack.append(i)
    cnt[i] = 1
dp = [[] for i in range(n+1)]
while stack:
  x = stack.pop()
  if dp[x]:
    cnt[x] = sum(dp[x])+1
  for y in graph[x]:
    if deg[y] > 1:
      dp[y].append(cnt[x])
      deg[y] -= 1
      if deg[y] == 1:
        stack.append(y)
def euler_tour(G, root=1):
  n = len(G)
  euler = []
  dq = deque([root])
  dq2 = deque()
  visited = [0]*(n+1)
  while dq:
    u = dq.pop()
    euler += [u]
    if visited[u]:
      continue
    for v in G[u]:
      if visited[v]:
        dq += [v]
    # [親頂点、子頂点、子頂点、。。。]と入れていく.その後連結
      else:
        dq2 += [v]
    dq.extend(dq2)
    dq2 = deque()
    visited[u] = 1
  return euler
order = euler_tour(graph)
ans1 = fctr[n]
for i in range(1,n+1):
  ans1 = (ans1*pow(cnt[i],mod-2,mod))%mod
ans = [0]*(n+1)
ans[1] = ans1
for i in range(1,len(order)):
  prv = order[i-1]
  now = order[i]
  no = cnt[now]
  cnt[prv] -= cnt[now]
  cnt[now] += cnt[prv]
  pr = cnt[prv]
  if ans[now]:
    continue
  ans[now] = ans[prv]*pow(pr,mod-2,mod)*no%mod
ans = ans[1:]
print(*ans,sep="\n")