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 <algorithm>
#include <vector>
using namespace std;
const long long mod = 1000000007;
long long pw(long long b, long long e) {
	if (e == 0) return 1;
	long long a = pw(b, e / 2);
	a = a * a % mod;
	if (e % 2) a = a * b % mod;
	return a;
}
long long fac[200001], inv[200001], stans[200000], pans[200000];
int N, stsize[200000];
vector<int> adjlist[200000];
int dfs(int v, int p) {
	stans[v] = 1;
	stsize[v] = 1;
	for (int i: adjlist[v]) {
		if (i == p) continue;
		stsize[v] += dfs(i, v);
		stans[v] = stans[v] * stans[i] % mod * inv[stsize[i]] % mod;
	}
	stans[v] = stans[v] * fac[stsize[v] - 1] % mod;
	return stsize[v];
}
void dfs2(int v, int p) {
	if (v != 0) {
		pans[v] = stans[p];
		pans[v] = pans[v] * inv[stsize[p] - 1] % mod;
		pans[v] = pans[v] * fac[stsize[v]] % mod;
		pans[v] = pans[v] * pw(stans[v], mod - 2) % mod;
		pans[v] = pans[v] * pans[p] % mod * inv[N - stsize[p]] % mod;
		pans[v] = pans[v] * fac[N - stsize[v] - 1] % mod;
	} else pans[v] = 1;
	for (int i: adjlist[v]) {
		if (i == p) continue;
		dfs2(i, v);
	}
}
int main() {
	fac[0] = 1;
	for (int i = 1; i <= 200000; ++i) fac[i] = i * fac[i - 1] % mod;
	for (int i = 0; i <= 200000; ++i) inv[i] = pw(fac[i], mod - 2);
	int a, b;
	scanf("%d", &N);
	for (int i = 1; i < N; ++i) {
		scanf("%d %d", &a, &b);
		adjlist[a - 1].push_back(b - 1);
		adjlist[b - 1].push_back(a - 1);
	}
	dfs(0, -1);
	dfs2(0, -1);
	for (int i = 0; i < N; ++i) {
		long long ans = stans[i];
		ans = ans * pans[i] % mod;
		ans = ans * fac[N - 1] % mod * inv[stsize[i] - 1] % mod * inv[N - stsize[i]] % mod;
		printf("%lld\n", ans);
	}
	return 0;
}