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
//by szh
#include<bits/stdc++.h>
using namespace std;

#define pb push_back
#define fi first
#define SZ(x) (int((x).size()))
#define se second
#define ll long long
#define pq priority_queue
#define MP make_pair
#define pii pair<int,int>
#define mod 1000000007
#define debug(x) cerr<<#x<<"="<<x<<'\n'

const int maxn=2e5+10;

int n;
vector <int> edge[maxn];
ll f[maxn],ans[maxn];
ll pre[maxn],suf[maxn];
int sz[maxn];
ll tmp[maxn];

ll inv(ll base,int p) {
	ll res=1;
	while (p) {
		if (p%2==1) (res*=base)%=mod;
		base=base*base%mod;
		p/=2;
	}
	return res;
}

void dfs1(int u,int fa) {
	ll tmp1=1,tmp2=1;
	sz[u]=0;
	f[u]=1;
	for (int i=0;i<SZ(edge[u]);i++) {
		int v=edge[u][i];
		if (v==fa) continue;
		dfs1(v,u);
		(f[u]*=f[v]*inv(tmp[sz[v]],mod-2)%mod)%=mod;
		sz[u]+=sz[v];
	}
	sz[u]++;
	f[u]=f[u]*tmp[sz[u]-1]%mod;
//	printf("f[%d]=%d\n",u,f[u]);
}

void dfs2(int u,int fa) {
	ans[u]=f[u]*inv(tmp[sz[u]-1],mod-2)%mod;
	if (fa!=-1) {
		ll cur=1;
		cur=ans[fa]*inv(tmp[sz[1]-1],mod-2)%mod;
		cur=cur*tmp[sz[u]]%mod*inv(f[u],mod-2)%mod;
//		printf("%d cur=%d %d %d %d %d\n",u,cur,fa,f[u],sz[1]-1,sz[u]);
		cur=cur*inv(sz[1]-sz[u],mod-2)%mod;
		ans[u]=ans[u]*cur%mod;
	}
	ans[u]=ans[u]*tmp[sz[1]-1]%mod;
	for (int i=0;i<SZ(edge[u]);i++) {
		int v=edge[u][i];
		if (v==fa) continue;
		dfs2(v,u);
	}
}

int main(){
	tmp[0]=1;
	for (int i=1;i<maxn;i++) tmp[i]=tmp[i-1]*(ll)i%mod,ans[i]=1;
	scanf("%d",&n);
	for (int i=0;i<n-1;i++) {
		int u,v;
		scanf("%d%d",&u,&v);
		edge[u].pb(v);
		edge[v].pb(u);
	}
	dfs1(1,-1);
	dfs2(1,-1);
	for (int i=1;i<=n;i++) 
		printf("%d\n",ans[i]);
	return 0;
}
