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;
typedef long long ll;
int N;
vector<vector<int>> G;
vector<ll> fact, invfact;
vector<map<int, pair<int, ll>>> memo;
ll modpow(ll x, int y) {
	ll r = 1;
	while (y > 0) {
		if (y&1) (r *= x) %= mod;
		(x *= x) %= mod;
		y >>= 1;
	}
	return r;
}
pair<int, ll> f(int p, int q) {
	if (memo[p].count(q)) return memo[p][q];
	int res1 = 1;
	ll res2 = 1;
	if (memo[p].count(N)) {
		res1 = memo[p][N].first;
		res2 = memo[p][N].second;
		(res2 *= invfact[res1-1]) %= mod;
		auto pp = f(q, p);
		res1 -= pp.first;
		(res2 *= modpow(pp.second, mod-2)) %= mod;
		(res2 *= fact[pp.first]) %= mod;
		(res2 *= fact[res1-1]) %= mod;
	} else {
		for (const auto& x : G[p]) if (x != q) {
			auto pp = f(x, p);
			res1 += pp.first;
			(res2 *= pp.second) %= mod;
			(res2 *= invfact[pp.first]) %= mod;
		}
		(res2 *= fact[res1-1]) %= mod;
	}
	//cerr << p << " " << q << " " << res1 << " " << res2 << endl;
	return memo[p][q] = {res1, res2};
}
int main() {
	cin >> N;
	G.resize(N);
	fact.resize(N+1);
	invfact.resize(N+1);
	fact[0] = invfact[0] = 1;
	for (int i = 1; i <= N; ++ i) {
		fact[i] = fact[i-1] * i % mod;
		invfact[i] = modpow(fact[i], mod-2);
	}
	for (int i = 0; i < N-1; ++ i) {
		int a, b;
		cin >> a >> b;
		-- a; -- b;
		G[a].push_back(b);
		G[b].push_back(a);
	}
	memo.resize(N);

	vector<pair<int,int>> hoge;
	for (int i = 0; i < N; ++ i) hoge.push_back({(int)G[i].size(), i});
	sort(hoge.rbegin(), hoge.rend());

	vector<int> res(N);
	for (auto pp : hoge) {
		int i = pp.second;
		res[i] = f(i, N).second;
	}
	for (int i = 0; i < N; ++ i) {
		cout << res[i] << endl;
	}
}
