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<iostream>
#include<cstdio>
#include<queue>
#include<vector>
#include<algorithm>
#include<cstring>
using namespace std;
typedef long long ll;
const int mod=1000000007;
int n,jc[200005]={1},ny[200005]={1};
vector<int> g[200005];
ll f[200005],f2[100005],size[200005];
int Power(int x,long long y,int mod) {
	int ret=1;
	while(y) {
		if(y&1)ret=1ll*ret*x%mod;
		x=1ll*x*x%mod,y>>=1;
	}
	return ret;
}
int C(int x,int y){
	return 1ll*jc[x]*ny[y]%mod*ny[x-y]%mod;
}
void DFS(int x,int fa) {
	f[x]=size[x]=1;
	for(int y:g[x]) {
		if(y==fa)continue;
		DFS(y,x);
		f[x]=1ll*f[x]*f[y]%mod*C(size[x]+size[y]-1,size[x]-1)%mod;
		size[x]+=size[y];
	}
}
void HuanGen(int x,int fa){
	for(int y:g[x]){
		if(y==fa)continue;
		int tmp=1ll*f2[x]*Power(C(n-1,n-size[y]-1),mod-2,mod)%mod*Power(f[y],mod-2,mod)%mod;
		f2[y]=1ll*f[y]*tmp%mod*C(n-1,size[y]-1)%mod;
		HuanGen(y,x);
	}
}
int main() {
	cin>>n;
	for(int i=1; i<n; i++) {
		int x,y;
		cin>>x>>y;
		g[x].push_back(y),g[y].push_back(x);
	}
	for(int i=1; i<=n; i++)jc[i]=1ll*jc[i-1]*i%mod;
	ny[n]=Power(jc[n],mod-2,mod);
	for(int i=n-1; i>=1; i--)ny[i]=1ll*(i+1)*ny[i+1]%mod;
	memset(size,0,sizeof(size));
	DFS(1,0);
	f2[1]=f[1];
	HuanGen(1,0);
	for(int i=1;i<=n;i++)cout<<f2[i]<<endl;
	return 0;
}
