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: def main():
      M = 10**9 + 7
      N = 10**5 * 2
      fac = [0] * (N + 1)
      fac[0] = b = 1
      for i in range(1, N + 1):
          fac[i] = b = b * i % M
      inv = [0] * (N + 1)
      inv[N] = b = pow(fac[N], M - 2, M)
      for i in range(N, 0, -1):
          inv[i - 1] = b = b * i % M
      n, *t = open(0).read().split()
      n = int(n)
      e = [[] for _ in range(n)]
      for a, b in zip(*[map(int, t)] * 2):
          e[a - 1] += (b - 1,)
          e[b - 1] += (a - 1,)
      o = []
      s = [0]
      f = [1] * n
      while s:
          v = s.pop()
          f[v] = 0
          o += (v,)
          l = []
          for w in e[v]:
              if f[w]:
                  l += (w,)
                  s += (w,)
          e[v] = l
      sz1, sz2 = [0] * n, [0] * n
      dp1, dp2 = [0] * n, [0] * n
      c = [[] for _ in range(n)]
      for v in o[::-1]:
          s = b = 1
          c1, c2 = [1], [1]
          for w in e[v]:
              u = sz1[w]
              b = b * dp1[w] * inv[u] % M
              c1 += (b,)
              s += u
          b = 1
          for w in e[v][::-1]:
              b = b * dp1[w] * inv[sz1[w]] % M
              c2 += (b,)
          c[v] = c1, c2[-2::-1]
          sz1[v] = s
          dp1[v] = b * fac[s - 1] % M
      # print(dp1)
      sz2[0] = 1
      dp2[0] = 1
      for v in o:
          l = len(e[v])
          c1, c2 = c[v]
          uv = sz2[v] - 1
          tv = dp2[v] * inv[uv]
          uv += sz1[v]
          for w, l, r in zip(e[v], c1, c2):
              tw = l * r % M
              uw = uv - sz1[w] - 1
              dp2[w] = tv * tw * fac[uw] % M
              sz2[w] = uw + 2
      # print(dp2)
      a = []
      for dp1, dp2, sz1, sz2 in zip(dp1, dp2, sz1, sz2):
          sz1 -= 1
          sz2 -= 1
          a += (str(dp1 * dp2 * inv[sz1] * inv[sz2] * fac[sz1 + sz2] % M),)
      print("\n".join(a))
  
  
  main()
  
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)"}]