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 <vector>
#include <algorithm>
#include <queue>
using namespace std;
typedef long long ll;

const ll mod=1e9+7;

ll mod_pow(ll a,ll b){
	a%=mod;
	if(b==0)return 1;
	if(b==1)return a;
	ll res=mod_pow(a,b/2)%mod;
	res*=res; res%=mod;
	if(b%2)res*=a;
	return res%mod;
}

int n;
vector<int> g[200200];
ll p[200200];
ll d[202020];

ll q[202020];
ll qq[202020];

void dfs(int s,int pp){
	d[s]=1;
	for(int t:g[s]){
		if(t==pp)continue;
		p[t]=s;
		dfs(t,s);
		d[s]+=d[t];
		(q[s]*=q[t])%=mod;
	}
	(q[s]*=mod_pow(d[s],mod-2))%=mod;
}

void dfs2(int s,int p){
	ll re=1;
	for(int t:g[s]){
		if(t==p)continue;
		(re*=q[t])%=mod;
	}
	for(int t:g[s]){
		if(t==p)continue;
		(qq[t]*=qq[s]*re%mod*mod_pow(q[t],mod-2)%mod*mod_pow((n-d[t]),mod-2)%mod)%=mod;
		dfs2(t,s);
	}
}

int main(){
	cin.tie(nullptr);
	ios::sync_with_stdio(false);
	cin >> n;
	for(int i=1;i<n;i++){
		int a,b; cin >> a >> b;
		a--; b--;
		g[a].push_back(b);
		g[b].push_back(a);
	}
	for(int i=0;i<n;i++){
		q[i]=1;
		qq[i]=1;
	}
	p[0]=-1;
	dfs(0,-1);
	dfs2(0,-1);
	ll res=1;
	for(int i=1;i<n;i++){
		(res*=i)%=mod;
	}
	for(int i=0;i<n;i++){
		ll ans=res;
		for(int t:g[i]){
			if(p[t]==i){
				(ans*=q[t])%=mod;
			}else{
				(ans*=mod_pow(n-d[i],mod-2))%=mod;
				ll re=q[t];
				(re*=d[t])%=mod;
				(re*=mod_pow(q[i],mod-2))%=mod;
				(ans*=re)%=mod;
				(ans*=qq[t])%=mod;
			}
		}
		cout << ans << endl;
	}
}
