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 <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i = 0; i < (int)n; i++)
using ll = long long;
const ll mod = 1e9+7;
const int MAX = 2e5+1;
vector<vector<int>> g(MAX);
vector<ll> dp1(MAX,0);
vector<ll> dp2(MAX,0);
vector<ll> ans(MAX,0);
vector<ll> per(MAX,1);
int n;

ll Pow(ll x, ll n){
  if(n == 0) return 1;
  if(n % 2 == 0) return Pow(x*x % mod, n/2);
  else return x * Pow(x,n-1) % mod;
}

ll mod_inverse(ll a) {
  return Pow(a,mod-2);
}

ll dfs1(int u, int p) {
  ll res = 1;
  for(auto e : g[u]) {
    if(e != p) res += dfs1(e,u);
  }
  return dp1[u] = res;
}

ll dfs2(int u, int p) {
  ll res = 1;
  for(auto e : g[u]) {
    if(e != p) {
      (res *= dfs2(e,u)) %= mod;
      (res *= mod_inverse(per[dp1[e]])) %= mod;
    }
  }
  return dp2[u] = (res * per[dp1[u]-1]) % mod;
}

void dfs3(int u, int p, int q, ll r) {
  ll res = r;
  (res *= mod_inverse(per[q])) %= mod;
  for(auto e : g[u]) {
    if(e != p) {
      (res *= dp2[e]) %= mod; 
      (res *= mod_inverse(per[dp1[e]])) %= mod; 
    } 
  }
  ans[u] = (per[n-1] * res) % mod;
  for(auto e : g[u]) {
    if(e != p) {
      ll a = ans[u];
      (a *= per[dp1[e]]) %= mod;
      (a *= mod_inverse(per[n-1])) %= mod;
      (a *= per[n-1-dp1[e]]) %= mod;
      (a *= mod_inverse(dp2[e])) %= mod;
      dfs3(e,u,n-dp1[e],a);
    }
  }
}

int main(){
  cin >> n;
  rep(i,n-1) {
    int a, b;
    cin >> a >> b;
    a--; b--;
    g[a].push_back(b);
    g[b].push_back(a);
  }
  for(ll i = 1; i < MAX; i++) per[i] = (per[i-1] * i) % mod; 
  dfs1(0,-1);
  dfs2(0,-1);
  dfs3(0,-1,0,1);
  rep(i,n) cout << ans[i] << endl;
  return 0;
}
