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;
typedef long long int ll;
typedef long double ld;
ll n,p[200005],inv[200005],sz[200005],dp[200005],val,hell=pow(10,9)+7;
ll exp(ll x,ll y){
  ll res=1;
  x%=hell;
  while(y>0){
    if(y&1)
      res=(res*x)%hell;
    y>>=1;
    x=(x*x)%hell;
  }
  return res;
}
void dfs0(ll i,ll par,vector<vector<ll>> &v){
  sz[i]=dp[i]=1;
  for(ll j=0;j<v[i].size();j++)
    if(v[i][j]!=par){
      dfs0(v[i][j],i,v);
      dp[i]*=dp[v[i][j]];
      dp[i]%=hell;
      sz[i]+=sz[v[i][j]];
    }
  dp[i]*=p[sz[i]-1];
  dp[i]%=hell;
  for(ll j=0;j<v[i].size();j++)
    if(v[i][j]!=par){
      dp[i]*=inv[sz[v[i][j]]];
      dp[i]%=hell;
    }
}
void dfs1(ll i,ll par,vector<vector<ll>> &v){
  for(ll j=0;j<v[i].size();j++)
    if(v[i][j]!=par){
      ll val=(dp[i]*p[n-sz[v[i][j]]-1])%hell;
      val*=(p[sz[v[i][j]]]*inv[sz[v[i][j]]-1])%hell;
      val%=hell;
      val*=(inv[n-sz[v[i][j]]]*exp(dp[v[i][j]],hell-2))%hell;
      val%=hell;
      dp[v[i][j]]*=val;
      dp[v[i][j]]%=hell;
    }
  for(ll j=0;j<v[i].size();j++)
    if(v[i][j]!=par)
      dfs1(v[i][j],i,v);
}
void solve(){
  p[0]=inv[0]=1;
  for(ll i=1;i<200005;i++){
    p[i]=(i*p[i-1])%hell;
    inv[i]=exp(p[i],hell-2);
  }
  cin>>n;
  vector<vector<ll>> v(n+1);
  for(ll i=0;i<n-1;i++){
    ll a,b;
    cin>>a>>b;
    v[a].push_back(b);
    v[b].push_back(a);
  }
  dfs0(1,1,v);
  dfs1(1,1,v);
  for(ll i=1;i<=n;i++)
    cout<<dp[i]<<endl;
}
int main(){
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ll q=1;
  for(ll i=1;i<=q;i++)
    solve();
}