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<iostream>
#include<vector>
using namespace std;

typedef long long ll;
ll f[200001], finv[200001], dp[200001], ans[200001];
int child[200001];
const ll mod = 1000000007;

ll modpow(ll a, ll b, ll p = 1e9+7){
    if(b == 0)  return 1;

    if(b % 2 == 0){
        ll d = modpow(a, b/2, p);
        return (d*d) % p;
    }else{
        return (a%p * modpow(a, b-1, p)) % p;
    }
}

vector<int> v[200001];
int n;

void dfs(int p, int x){
    child[x] = 1;
    for(int j : v[x]){
        if(j == p)  continue;
        dfs(x, j);
        child[x] += child[j];
    }
    dp[x] = f[child[x]-1];
    for(int j : v[x]){
        if(j == p)  continue;
        dp[x] = dp[x]*finv[child[j]]%mod*dp[j]%mod;
    }
}

void dfs2(int p, int x){
    for(int j : v[x]){
        if(j == p)  continue;
        ans[j] = ans[x]*finv[n-1]%mod*f[n-1-child[j]]%mod*f[child[j]]%mod*modpow(dp[j], mod-2)%mod;
        ans[j] = ans[j]*f[n-1]%mod*finv[n-child[j]]%mod;
        for(int k : v[j]){
            if(k == x)  continue;
            ans[j] = ans[j]*finv[child[k]]%mod*dp[k]%mod;
        }
        dfs2(x, j);
    }
}

int main(){
    f[0] = finv[0] = 1;
    for(int i = 1; i <= 200000; i++){
        f[i] = f[i-1]*i%mod;
    }
    finv[200000] = modpow(f[200000], mod-2);
    for(int i = 199999; i >= 1; i--){
        finv[i] = finv[i+1]*(i+1)%mod;
    }

    cin >> n;
    for(int i = 0; i < n-1; i++){
        int a, b;
        cin >> a >> b;
        v[a].push_back(b);
        v[b].push_back(a);
    }
    dfs(0, 1);
    ans[1] = dp[1];
    dfs2(0, 1);
    for(int i = 1; i <= n; i++) cout << ans[i] << endl;
    return 0;
}