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 ll long long
#define all(V) V.begin(),V.end()
#define MOD 1000000007

vector<int> G[200010], T[200010];
ll P[200010], W[200010], F[200010], pt[200010], inv[200010], ptp[200010], N;

ll modpow(ll x, ll y) {
	ll ans = 1;
	while (y) {
		if (y & 1)
			ans *= x;
		ans %= MOD;
		x *= x;
		x %= MOD;
		y /= 2;
	}
	return ans;
}

void make_tree(int c, int p) {
	T[p].push_back(c);
	P[c] = p;
	for (int i : G[c]) {
		if (i == p)continue;
		make_tree(i, c);
	}
}

ll nCk(ll n, ll k) {
	return F[n] * inv[k] % MOD * inv[n - k] % MOD;
}

void eval(int k) {
	ll w = 0, p = 1;
	for (int i : T[k]) {
		eval(i);
		w += W[i];
		p *= pt[i];
		p %= MOD;
	}
	W[k] = w + 1;
	for (int i : T[k]) {
		p *= nCk(w, W[i]);
		p %= MOD;
		w -= W[i];
	}
	pt[k] = p;
}

void eval_rev(int c, int p) {
	if (c == 1) {
		ptp[c] = pt[c];
	}
	else {
		ll pp = ptp[p] * modpow(nCk(N - 1, W[c]) * pt[c] % MOD, MOD - 2) % MOD;
		ptp[c] = nCk(N - 1, N - W[c]) * pp % MOD * pt[c] % MOD;
	}
	for (int i : T[c]) {
		eval_rev(i, c);
	}
}

int main() {
	F[0] = 1;
	inv[0] = 1;
	for (ll i = 1;i < 200010;i++) {
		F[i] = F[i - 1] * i % MOD;
		inv[i] = modpow(F[i], MOD - 2);
	}
	int a, b;
	cin >> N;
	for (int i = 1;i < N;i++) {
		cin >> a >> b;
		G[a].push_back(b);
		G[b].push_back(a);
	}
	make_tree(1, 0);
	eval(1);

	eval_rev(1, 0);

	for (int i = 1;i <= N;i++) {
		cout << ptp[i] << "\n";
	}
}