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>
 
#define f(i,a,b) for( ll i = a; i < (ll) b ; i++ ) 
#define af(i,a,b) for( ll i = a; i >= (ll) b ; i--)
#define rep(i,a,b,k) for(ll i = a; i < b ; i+= k )
#define arep(i,a,b,k) for( ll i = a; i >= b ; i-= k)
#define fs first
#define sc second
#define pb push_back
#define mp make_pair
#define sz(a) (ll) a.size()
#define all(a) a.begin(), a.end()
#define sor(a) sort( a.begin(), a.end() )
#define fastio ios_base::sync_with_stdio(false);cin.tie(NULL)
#define inter ios::sync_with_stdio(false);cin.tie(nullptr);cout.tie(nullptr)
using namespace std;
 
typedef long long ll;
typedef long double ld;
typedef pair<ll,ll> ii ;
typedef vector<ll>  vi ;
typedef vector<ii> vii ;
 
const ll MAX= 3e5+100;

ll dp[MAX],n,ans[MAX],siz[MAX],fac[MAX],mod=1e9+7;
vi adj[MAX];

ll bp(ll a,ll e){
	if(e==0) return 1;
	if(e&1) return (bp(a,e-1)*a)%mod;
	ll x = bp(a,e>>1);
	return (x*x)%mod; 
}

ll inv(ll a){
	return bp(a,mod-2);
}

void dfs(int u,int f){
	dp[u]=1,siz[u]=1;
	f(i,0,adj[u].size()){
		ll v=adj[u][i];
		if(v==f) continue;
		dfs(v,u);
		siz[u]+=siz[v];
		(dp[u]*=dp[v])%=mod;
		(dp[u]*=inv(fac[siz[v]]))%=mod;
	}
	(dp[u]*=fac[siz[u]-1])%=mod;
}

void dfs1(int u,int f){
	f(i,0,adj[u].size()){
		ll v=adj[u][i];
		if(v==f) continue;
		ans[v]=(ans[u]*((siz[v]*inv(n-siz[v]))%mod))%mod;
		dfs1(v,u);
	}
}

int main(){
	fastio;
	ll u,v;
	fac[0]=1;
	f(i,1,MAX) (fac[i]=i*fac[i-1])%=mod;
	cin>>n;
	f(i,1,n){
		cin>>u>>v;
		adj[u].push_back(v);
		adj[v].push_back(u);
	}
	dfs(1,0);
	ans[1]=dp[1];
	dfs1(1,0);
	f(i,1,n+1) cout<<ans[i]<<endl;
	return 0;	
}