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 ll long long
#define clr(x,i) memset(x,i,sizeof(x))
using namespace std;
const int N=200005;
const ll mod=1e9+7;
inline int read()
{
    int x=0,f=1; char ch=getchar();
    while(ch<'0'||ch>'9') {if(ch=='-') f=-1; ch=getchar();}
    while(ch>='0'&&ch<='9') {x=x*10+ch-'0',ch=getchar();}
    return x*f;
}
vector<int> G[N];
int n,siz[N],siz2[N];
ll fac[N],inv[N],f[N],f2[N],ans[N];
ll qpow(ll x,ll k)
{
	ll ret=1;
	while(k){
		if(k&1) ret*=x,ret%=mod;
		x*=x,x%=mod,k>>=1;
	}
	return ret;
}
ll INV(ll x)
{
	return qpow(x, mod-2);
}
ll C(int x,int y)
{
	return fac[x]*inv[y]%mod*inv[x-y]%mod;
}
void dfs1(int u,int pre)
{
	ll s=0; f[u]=siz[u]=1;
	for(auto v:G[u])if(v!=pre){
		dfs1(v, u); s+=siz[v]; siz[u]+=siz[v];
		f[u]=f[u]*f[v]%mod*C(s, siz[v])%mod;
	}
}
void dfs2(int u,int pre)
{
	if(u!=1){
		siz2[u]=n; siz2[pre]=n-siz[u];
		f2[pre]=ans[pre]*INV(f[u])%mod*INV(C(n-1, siz[u]))%mod;
		f2[u]=f[u]*f2[pre]%mod*C(siz[u]-1+siz2[pre], siz2[pre])%mod;
	}
	else f2[u]=f[u];
	ans[u]=f2[u];
	for(auto v:G[u]) if(v!=pre) dfs2(v, u);
}
int main()
{
	n=read();
	for(int i=1; i<n; i++){
		int u=read(),v=read();
		G[u].push_back(v); G[v].push_back(u);
	}
	fac[0]=1;
	for(int i=1; i<=n; i++) fac[i]=fac[i-1]*i%mod;
	inv[n]=INV(fac[n]);
	for(int i=n-1; ~i; i--) inv[i]=inv[i+1]*(i+1)%mod;
	dfs1(1, 0);
//	for(int i=1; i<=n; i++) printf("%lld\n",f[i]); puts("");
	dfs2(1, 0);
	for(int i=1; i<=n; i++) printf("%lld\n",ans[i]);
	return 0;
}