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;
const int mod=1000000007,maxn=200100;
inline void Add(int &a,int b){a=a+b>=mod?a+b-mod:a+b;}
inline int ksm(int a,int b)
{
	int res=1;
	for(;b;b>>=1,a=1ll*a*a%mod) if(b&1) res=1ll*res*a%mod;
	return res;
}
int fac[maxn],invfac[maxn];
inline int C(int n,int m){return 1ll*fac[n]*invfac[m]%mod*invfac[n-m]%mod;}
int head[maxn],nxt[maxn<<1],ver[maxn<<1],tot;
inline void addedge(int a,int b)
{
	nxt[++tot]=head[a];ver[tot]=b;head[a]=tot;
	nxt[++tot]=head[b];ver[tot]=a;head[b]=tot;
}
int ans[maxn],size[maxn],f[maxn],n;
inline void dfs(int x,int fat)
{
	f[x]=1;size[x]=1;
	for(int i=head[x];i;i=nxt[i])
	{
		int y=ver[i];if(y==fat) continue;
		dfs(y,x);f[x]=1ll*f[x]*invfac[size[y]]%mod;
		size[x]+=size[y];f[x]=1ll*f[x]*f[y]%mod;
	}
	f[x]=1ll*f[x]*fac[size[x]-1]%mod;
}
inline void bao(int x,int fat,int upv)
{
	int v=1ll*f[x]*upv%mod*C(n-1,size[x]-1)%mod;
	ans[x]=v;
	for(int i=head[x];i;i=nxt[i])
	{
		int y=ver[i];if(y==fat) continue;
		int nxtv=1ll*v*ksm(f[y],mod-2)%mod;
		nxtv=1ll*nxtv*invfac[n-1]%mod*fac[n-size[y]-1]%mod*fac[size[y]]%mod;
		bao(y,x,nxtv);
	}
}
int main()
{
	for(int i=fac[0]=1;i<maxn;i++) fac[i]=1ll*fac[i-1]*i%mod;
	invfac[maxn-1]=ksm(fac[maxn-1],mod-2);
	for(int i=maxn-2;i>=0;i--) invfac[i]=1ll*invfac[i+1]*(i+1)%mod;
	scanf("%d",&n);
	for(int i=1,a,b;i<n;i++) scanf("%d%d",&a,&b),addedge(a,b);
	dfs(1,0);bao(1,0,1);
	for(int i=1;i<=n;i++) printf("%d\n",ans[i]);
	return 0;
}