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 fi first
#define se second
#define all(x) (x).begin(), (x).end()
#define endl '\n'

typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<double, int> pdi;

const int INF = 1e9;
const int MAXN = 2e5 + 5;
const int MOD = 1e9 + 7;

int N, sz[MAXN];
ll ans[MAXN], fac[MAXN];
vector<int> G[MAXN]; 

ll POW(int a, int b) {
	if(b == 0) return 1;
	if(b == 1) return a;
	ll t = POW(a, b/2); t = (t*t) % MOD;
	if(b & 1) t = (a * t) % MOD;
	return t;
}
ll MOD_INV(int x) { return POW(x, MOD-2); }

ll dp[MAXN];
ll dfs0(int x, int p) {
	dp[x] = 1;
	for(int i : G[x]) if(i != p) {
		dp[x] = (dp[x] * dfs0(i, x)) % MOD;
		dp[x] = (dp[x] * MOD_INV(fac[sz[i]])) % MOD;
		sz[x] += sz[i];
	}
	dp[x] = (dp[x] * fac[sz[x]]) % MOD;
	sz[x]++;
	return dp[x];
}

void dfs(int x, int p) {
	ans[x] = fac[N-1];
	ll szp = N-1, val;
	for(int i : G[x]) if(i != p) {
		ans[x] = (ans[x] * dp[i]) % MOD;
		ans[x] = (ans[x] * MOD_INV(fac[sz[i]])) % MOD;
		szp -= sz[i];
	}
	if(x != 1) {
		val = ans[p];
		val = (val * MOD_INV(fac[N-1])) % MOD;
		val = (val * fac[N-1-sz[x]]) % MOD;
		val = (val * fac[sz[x]]) % MOD;
		val = (val * MOD_INV(dp[x])) % MOD;
		ans[x] = (ans[x] * val) % MOD;
		ans[x] = (ans[x] * MOD_INV(fac[szp])) % MOD;
	}
	for(int i : G[x]) if(i != p) dfs(i, x);
}

int main() {
	ios::sync_with_stdio(0); cin.tie(0);
	cin >> N;
	fac[0] = 1;
	for(int i=1; i<N; i++) {
		int a, b; cin >> a >> b;
		G[a].push_back(b); G[b].push_back(a);
		fac[i] = fac[i-1] * i % MOD;
	}
	fac[N] = (fac[N-1] * N) % MOD;

	dfs0(1, 0);
	dfs(1, 0);

	for(int i=1; i<=N; i++) cout << ans[i] << endl;
}