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 int long long
#define rep(i,n) for(int i=0;i<n;i++)
#define REP(i,n) for(int i=1;i<n;i++)
#define P pair<int,int>
#define inf (int)(3e18)
#define all(v) v.begin(),v.end()
#define mod (int)(1e9+7)

template<class T> inline void chmin(T &a, T b) {
	a = min(a, b);
}
template<class T> inline void chmax(T &a, T b) {
	a = max(a, b);
}

int mod_pow(int x, int y, int m = mod) {
	int res = 1;
	x %= m;
	while (y > 0) {
		if (y & 1) {
			res = res * x % m;
		}
		x = x * x % m;
		y >>= 1;
	}
	return res;
}
int perm[1000005];
void init_perm(){
	perm[0]=1;
	REP(i,1000005)perm[i]=perm[i-1]*i%mod;
}
int nCk(int x,int y){
	if(x<y)return 0;
	return perm[x]*mod_pow(perm[x-y],mod-2)%mod*mod_pow(perm[y],mod-2)%mod;
}

int N;
int ansdown[200005],cntdown[200005];
int ansup[200005],cntup[200005];
vector<int>G[200005];
bool used[200005];
void dfs1(int x,int par){
	cntdown[x]=1;
	for(int i:G[x])if(i!=par){
		dfs1(i,x);
		cntdown[x]+=cntdown[i];
	}
	ansdown[x]=1;
	int now=cntdown[x]-1;
	for(int i:G[x])if(i!=par){
		ansdown[x]*=nCk(now,cntdown[i])*ansdown[i]%mod;
		ansdown[x]%=mod;
		now-=cntdown[i];
	}
}
int ans[200005];
void dfs2(int x,int par){
	ans[x]=ansup[x]*nCk(N-1,N-cntdown[x])%mod;
	ans[x]*=ansdown[x];
	ans[x]%=mod;
	for(int i:G[x])if(i!=par){
		ansup[i]=ans[x]*mod_pow(nCk(N-1,cntdown[i]),mod-2)%mod*mod_pow(ansdown[i],mod-2)%mod;
		dfs2(i,x);
	}
}
signed main() {
	init_perm();
	cin>>N;
	rep(i,N-1){
		int a,b;cin>>a>>b;a--;b--;
		G[a].push_back(b);G[b].push_back(a);
	}
	dfs1(0,0);
	ansup[0]=1;
	dfs2(0,0);
	rep(i,N)cout<<ans[i]<<endl;
}

