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
#pragma GCC optimize("Ofast")
#include<bits/stdc++.h>
#define int long long
#define gmax(x,y) x=max(x,y)
#define gmin(x,y) x=min(x,y)
#define F first
#define S second
#define P pair
#define FOR(i,a,b) for(int i=a;i<=b;i++)
#define rep(i,a,b) for(int i=a;i<b;i++)
#define V vector
#define RE return
#define ALL(a) a.begin(),a.end()
#define MP make_pair
#define PB emplace_back
#define PF emplace_front
#define FILL(a,b) memset(a,b,sizeof(a))
#define lwb lower_bound
#define upb upper_bound
using namespace std;
const int mod=1e9+7;
int up[200005],down[200005],sub[200005],fa[200005],n;
V<int> v[200005];
int f[200005],inv[200005];
int POW(int x,int y){
	if(!y)RE 1;
	int ans=POW(x,y>>1);ans=ans*ans%mod;
	if(y&1)RE ans*x%mod;else RE ans;
}
int C(int x,int y){
	RE f[y]*inv[x]%mod*inv[y-x]%mod;
}
void dfs(int p){
	for(auto u:v[p])if(u!=fa[p]){
		fa[u]=p;
		dfs(u);
		sub[p]+=sub[u];
	}
	int t=sub[p];
	down[p]=1;
	for(auto u:v[p])if(u!=fa[p]){
		down[p]=down[p]*C(sub[u],t)%mod*down[u]%mod;
		t-=sub[u];
	}
	sub[p]++;
}
void solve(int p){
	if(sub[p]==1)RE;
	int h=up[p]*C(n-sub[p],n-1)%mod,t=sub[p]-1;
	for(auto u:v[p])if(u!=fa[p]){
		h=h*C(sub[u],t)%mod*down[u]%mod;
		t-=sub[u];
	}
	for(auto u:v[p])if(u!=fa[p]){
		up[u]=h*POW(C(sub[u],n-1),mod-2)%mod*POW(down[u],mod-2)%mod;
		solve(u);
	}
}
signed main(){
//	ios::sync_with_stdio(0);
//	cin.tie(0);
	int x,y;
	cin>>n;
	inv[0]=f[0]=1;
	FOR(i,1,n){
		f[i]=f[i-1]*i%mod;
		inv[i]=POW(f[i],mod-2);
	}
	rep(i,1,n){
		cin>>x>>y;
		v[x].PB(y);
		v[y].PB(x);
	}
	dfs(1);
	up[1]=1;
	solve(1);
	FOR(i,1,n)cout<<C(sub[i]-1,n-1)*up[i]%mod*down[i]%mod<<'\n';
	RE 0;
}


