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 int long long
#define rep(i,n) for(int i=0;i<n;i++)
#define all(a) (a).begin(),(a).end()
typedef pair<int, int> P;
const long long mod = 1000000007;
const int maxN = 200000;
vector<int>G[200006];
int kj[200006],kji[200006];
int dp1[200006], dp2[200006];
int dp3[200006];
int V;
int modpow(int a, int x) {
	int res = 1;
	while (x) {
		if (x & 1)res = res * a%mod;
		a = a * a%mod;
		x >>= 1;
	}
	return res;
}
void setkj() {
	kj[0] = 1;
	for (int i = 1; i <= maxN; i++)kj[i] = kj[i - 1] * i%mod;
	rep(i, maxN + 1)kji[i] = modpow(kj[i], mod - 2);
}

void dfs1(int now, int par) {
	dp1[now] = 1;
	for (int e : G[now]) {
		if (e == par)continue;
		dfs1(e, now);
		dp1[now] *= dp1[e]; dp1[now] %= mod;
		dp1[now] *= kji[dp2[e]]; dp1[now] %= mod;
		dp2[now] += dp2[e];
	}
	dp1[now] = dp1[now] * kj[dp2[now]] % mod;
	dp2[now]++;
}
void dfs2(int now, int par) {
	dp3[now] = kj[V - 1];
	for (int e : G[now]) {
		if (e == par) {
			int S = dp3[e];
			S = S*kji[V - 1]%mod *kj[dp2[now]]%mod* modpow(dp1[now], mod - 2)%mod*kj[V-dp2[now]-1]%mod;
			dp3[now] *= S; dp3[now] %= mod;
			dp3[now] *= kji[V - dp2[now]]; dp3[now] %= mod;
		}
		else {
			dp3[now] *= dp1[e]; dp3[now] %= mod;
			dp3[now] *= kji[dp2[e]]; dp3[now] %= mod;
		}
	}

	for (int e : G[now]) {
		if (e == par)continue;
		dfs2(e, now);
	}

}

signed main() {
	int n; cin >> n; V = n;
	setkj();
	rep(i, n - 1) {
		int a, b; cin >> a >> b;
		a--; b--;
		G[a].push_back(b);
		G[b].push_back(a);
	}

	dfs1(0, -1);
	dfs2(0, -1);
	rep(i, n)cout << dp3[i] << endl;

}
