output_description: For each k=1, 2, ..., N in this order, print a line containing the answer to
  the problem.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N
      a_1 b_1
      :
      a_{N-1} b_{N-1}
attempt: from collections import deque
  import sys
  
  input = sys.stdin.readline
  
  
  def abc():
      global qqq
      for i in range(len(ppp) - 1, 0, -1):
          qqq = qqq * cmb(ppp[i], ppp[i - 1]) % mod
      return qqq
  
  
  mod = 10**9 + 7
  MAX = 2 * 10**5 + 100
  g1 = [1, 1]
  g2 = [1, 1]
  for i in range(2, MAX + 1):
      num_1 = g1[-1] * i % mod
      g1.append(num_1)
      g2.append(pow(num_1, mod - 2, mod))
  
  
  def cmb(n, r):
      return g1[n] * g2[r] * g2[n - r] % mod
  
  
  N = int(input())
  AB = [list(map(int, input().split())) for i in range(N - 1)]
  data = [[] for i in range(N + 1)]
  for A, B in AB:
      data[A].append(B)
      data[B].append(A)
  parent = [0] * (N + 1)
  flag = [0] * (N + 1)
  child = [0] * (N + 1)
  parent[1] = -1
  flag[1] = 1
  que = [1]
  ddd = deque([])
  while que:
      h = []
      for u in que:
          for v in data[u]:
              if flag[v] == 0:
                  flag[v] = 1
                  h.append(v)
                  parent[v] = u
                  child[u] += 1
          if child[u] == 0:
              ddd.append(u)
      que = h
  # sizeは、子の数
  size = [0] * (N + 1)
  # lstは、書く順番の総数
  lst = [0] * (N + 1)
  while ddd:
      u = ddd.pop()
      size[u] = 1
      qqq = 1
      ppp = []
      for v in data[u]:
          if v == parent[u]:
              child[v] -= 1
              if child[v] == 0:
                  ddd.appendleft(v)
              continue
          else:
              size[u] += size[v]
              if ppp:
                  ppp.append(size[v] + ppp[-1])
              else:
                  ppp.append(size[v])
              qqq = qqq * lst[v] % mod
      lst[u] = abc()
  que = deque(data[1][:])
  # iを根としたときの答え
  ans = [0] * (N + 1)
  # lslsは親方向の場合の数
  lsls = [0] * (N + 1)
  ans[1] = lst[1]
  lsls[1] = 1
  while que:
      # uに対する場合の数を求める
      u = que.pop()
      par = parent[u]
      ppp = N - size[par]
      num = lst[u] * cmb(size[par] - 1, size[u])
      qqq = lst[par] * pow(num, mod - 2, mod) % mod
      qqq = qqq * lsls[par] * cmb(ppp + size[par] - size[u] - 1, ppp) % mod
      lsls[u] = qqq
      ppp = N - size[u]
      qqq = qqq * cmb(N - 1, size[u] - 1) * lst[u] % mod
      ans[u] = qqq
      for v in data[u]:
          if v == par:
              continue
          else:
              que.appendleft(v)
  for i in range(1, N + 1):
      print(ans[i])
  
problem_description: Statement
  
  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).
samples: [{"input": "3\n    1 2\n    1 3", "output": "2\n    1\n    1\n    \n\nThe graph in this input is as follows:\n\n![Figure](https://img.atcoder.jp/ghi/1c88b0eb716ba399b1c5d6565ab62337.png)\n\nFor k=1, there are two ways in which we can write the numbers on the vertices,\nas follows:\n\n  * Writing 1, 2, 3 on Vertex 1, 2, 3, respectively\n  * Writing 1, 3, 2 on Vertex 1, 2, 3, respectively\n\n* * *"}, {"input": "2\n    1 2", "output": "1\n    1\n    \n\nThe graph in this input is as follows:\n\n![Figure](https://img.atcoder.jp/ghi/c47c7798f88e7bfec30fbd664dc9ad50.png)\n\n* * *"}, {"input": "5\n    1 2\n    2 3\n    3 4\n    3 5", "output": "2\n    8\n    12\n    3\n    3\n    \n\nThe graph in this input is as follows:\n\n![Figure](https://img.atcoder.jp/ghi/e9c09403f8d96ae4e679a226993defa6.png)\n\n* * *"}, {"input": "8\n    1 2\n    2 3\n    3 4\n    3 5\n    3 6\n    6 7\n    6 8", "output": "40\n    280\n    840\n    120\n    120\n    504\n    72\n    72\n    \n\nThe graph in this input is as follows:\n\n![Figure](https://img.atcoder.jp/ghi/a85459a03d436560bfe2e911d8cec4e6.png)"}]