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(2)
#include<bits/stdc++.h>
#define ll long long
#define maxn 200005
#define inf 1e9
#define eps 1e-10
using namespace std;

inline int read()
{
	int x=0,w=1; char c=getchar();
	while(c<'0'||c>'9') {if(c=='-') w=-1; c=getchar();}
	while(c<='9'&&c>='0') {x=(x<<1)+(x<<3)+c-'0'; c=getchar();}
	return w==1?x:-x;
}

const ll mod=1000000007;
vector <int> mp[maxn];
ll fac[maxn],inv[maxn],siz[maxn],n,ans[maxn];

inline ll pw(ll a,ll b)
{
	ll ans=1,base=a;
	while(b)
	{
		if(b&1) ans=(ans*base)%mod;
		base=(base*base)%mod; b>>=1;
	}
	return ans;
}

inline void dfs1(int u,int fa)
{
	siz[u]=1;
	for(int i=0;i<mp[u].size();i++)
	{
		int v=mp[u][i]; if(v==fa) continue;
		dfs1(v,u); siz[u]+=siz[v];
	}
}

inline void dfs2(int u,int fa)
{
	for(int i=0;i<mp[u].size();i++)
	{
		int v=mp[u][i]; if(v==fa) continue;
		ans[v]=(ans[u]*pw(n-siz[v],mod-2)%mod)*siz[v]%mod; dfs2(v,u);
	}
}

int main()
{
	n=read(); fac[0]=1; inv[0]=1;
	for(int i=1;i<=maxn-5;i++) fac[i]=(fac[i-1]*i)%mod;
	for(int i=1;i<=maxn-5;i++) inv[i]=pw(fac[i],mod-2);
	for(int i=1;i<n;i++)
	{
		int u=read(),v=read();
		mp[u].push_back(v),mp[v].push_back(u);
	}
	dfs1(1,0); ll tmp=fac[n];
	for(int i=1;i<=n;i++) tmp=(tmp*pw(siz[i],mod-2))%mod; ans[1]=tmp;
	dfs2(1,0);
	for(int i=1;i<=n;i++) printf("%lld\n",ans[i]);
	return 0;
}