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<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
typedef long long ll;
const int MAXN = 2e5 + 5;
const int mod = 1e9 + 7;

struct Edge
{
	int next,to;
}e[MAXN<<1];
int head[MAXN],etot=0;
inline void add(int u,int v)
{
	e[++etot]=(Edge){ head[u],v};
	head[u]=etot;
}

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

ll fac[MAXN],inv[MAXN];
ll c(int n,int m)
{
	if(n<0 || m<0 || n<m) return 0;
	return fac[n] * inv[m] %mod * inv[n-m] %mod;
}

int n;
ll size[MAXN],f[MAXN];

void dfs_f(int u,int fa)
{
	size[u]=1;
	f[u]=1;
	int sum=0;
	for(int i=head[u]; i; i=e[i].next)
	{
		int v=e[i].to;
		if(v==fa) continue;
		dfs_f(v,u);
		
		size[u]+=size[v];
		sum += size[v];
		f[u] = f[u] * f[v] %mod * c(sum,size[v]) %mod;
	}
}

ll g[MAXN];
void dfs_g(int u,int fa)
{
	for(int i=head[u]; i; i=e[i].next)
	{
		int v=e[i].to;
		if(v==fa) continue;
		
		g[v] = g[u] * pw(c(n-1, size[v]), mod-2) %mod * c(n-1, n-size[v]) %mod;
		dfs_g(v,u);
	}
}

int main(void)
{
	fac[0]=1;
	for(int i=1; i<MAXN; ++i) fac[i]=fac[i-1]*i%mod;
	inv[MAXN-1]=pw(fac[MAXN-1],mod-2);
	for(int i=MAXN-2; i>=0; --i) inv[i] = inv[i+1]*(i+1)%mod;
	
	scanf("%d",&n);
	for(int i=1; i<n; ++i)
	{
		int u,v;
		scanf("%d%d",&u,&v);
		add(u,v); add(v,u);
	}
	
	dfs_f(1,0);
	g[1]=f[1];
	dfs_g(1,0);
	
	for(int i=1; i<=n; ++i) printf("%lld\n",g[i]);
	return 0;
}