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 M 1000000007
#define pb push_back
#define mp make_pair
#define s second
#define f first
#define mod 998244353
#define sz(v) (int)(v).size()

#define pii pair<int, int>
#define vi vector<int>
#define ll long long
#define fastio ios_base::sync_with_stdio(false);cin.tie(0)

ll add(ll a,ll b)
{
	a%=M;
	b%=M;
	ll p = (a+b)%M;
	return (p+M)%M;
}

ll mul(ll a,ll b)
{
	a%=M;
	b%=M;
	ll p = (a*b)%M;
	return (p+M)%M;
}

ll power(ll a,ll b)
{
	ll p=1;
	while(b)
	{
		if(b&1)
			p=mul(p,a);
		a=mul(a,a);
		b/=2;
	}
	return p;
}

vector<ll> adj[200010];
ll dp1[200010]={0},dp2[100010]={0};
ll siz[200010]={0};

void dfs1(ll i,ll par)
{
	ll j;
	siz[i]=1;
	for(j=0;j<sz(adj[i]);j++)
	{
		ll x = adj[i][j];
		if(x==par)
			continue;
		dfs1(x,i);
		siz[i] += siz[x];
	}
	return ;
}

void dfs2(ll i,ll par,ll n)
{
	if(i!=1)
		dp2[i]=mul(mul(dp2[par],siz[i]),power(n-siz[i],M-2));
	else
		dp2[i]=dp1[i];
	ll j;
	for(j=0;j<sz(adj[i]);j++)
	{
		ll x = adj[i][j];
		if(x==par)
			continue;
		dfs2(x,i,n);
	}
	return ;
}

int main()
{
	fastio;
	ll i,j,n;
	cin>>n;
	for(i=1;i<=n-1;i++)
	{
		ll u,v;
		cin>>u>>v;
		adj[u].pb(v);
		adj[v].pb(u);
	}	
	dfs1(1,0);
	ll ans=1;
	for(i=1;i<=n-1;i++)
		ans=mul(ans,i);
	for(i=2;i<=n;i++)
		ans=mul(ans,power(siz[i],M-2));
	// cout<<ans<<endl;
	dp1[1]=ans;
	dfs2(1,0,n);
	for(i=1;i<=n;i++)
		cout<<dp2[i]<<endl;

    return 0;
}



