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
#include <iostream>
#include <algorithm>
#include <vector>
#include <cstdint>
#include <queue>

int const MAXN = 2e5;
int64_t const MOD = 1e9+7;

std::vector<int> G[MAXN];
int N;

int64_t inv[MAXN+1];
int64_t fact[MAXN+1];
int64_t ifact[MAXN+1];

void init(int n) {
  fact[0] = ifact[0] = fact[1] = ifact[1] = inv[1] = 1;
  for(int64_t i = 2; i <= n; ++i) {
    fact[i] = fact[i-1]*i%MOD;
    inv[i] = (MOD/i)*(MOD - inv[MOD%i])%MOD;
    ifact[i] = ifact[i-1]*inv[i]%MOD;
  }
}

int64_t nn[MAXN];
int64_t dp1[MAXN];

void dfs1(int v, int p) {
  int64_t num = 0, val = 1;
  for(auto e: G[v]) {
    if(e == p) continue;
    dfs1(e, v);
    num += nn[e];
    val = val*dp1[e]%MOD;
    val = val*ifact[nn[e]]%MOD;
  }
  dp1[v] = val*fact[num]%MOD;
  nn[v] = num + 1;
}

void dfs2(int v, int p) {
  for(auto e: G[v]) {
    if(e == p) continue;
    int64_t tmp = dp1[v]*nn[e]%MOD;
    dp1[e] = tmp*inv[N-nn[e]]%MOD;
    dfs2(e, v);
  }
}

int main() {
  std::cin >> N;
  init(std::max(2, N));
  for(int i = 0; i < N-1; ++i) {
    int a, b;
    std::cin >> a >> b; --a; --b;
    G[a].push_back(b);
    G[b].push_back(a);
  }
  dfs1(0, -1);
  dfs2(0, -1);
  for(int i = 0; i < N; ++i) std::cout << dp1[i] << std::endl;
  return 0;
}
