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 <cstring>
using namespace std;
typedef long long ll;
const int N=2e5+10;
const int mod=1e9+7;
int p[N],inv[N];
// int ans[N];
int qmi(int a,int b)
{
    int ans=1;
    while(b){
        if(b&1)ans=((ll)ans*a)%mod;
        a=(ll)a*a%mod;
        b>>=1;
    }
    return ans;
}
int h[N],e[2*N],ne[2*N],idx;
void add(int a,int b)
{
    e[idx]=b,ne[idx]=h[a],h[a]=idx++;
}
int f[N];
int sz[N];
void dfs1(int u,int fa)
{
    sz[u]=1;
    for(int i=h[u];i!=-1;i=ne[i])
    {
        int j=e[i];
        if(j==fa)continue;
        dfs1(j,u);
        sz[u]+=sz[j];
    }
    f[u]=p[sz[u]-1];
    for(int i=h[u];i!=-1;i=ne[i])
    {
        int j=e[i];
        if(j==fa)continue;
        f[u]=(ll)f[u]*inv[sz[j]]%mod*f[j]%mod;
    }
}
int n;
int g[N],ans[N];
void dfs2(int u,int fa)
{
    ans[u]=(ll)f[u]*inv[sz[u]-1]%mod*p[n-1]%mod*inv[n-sz[u]]%mod*g[fa]%mod;
    for(int i=h[u];i!=-1;i=ne[i])
    {
        int j=e[i];
        if(j==fa)continue;
        g[u]=(ll)ans[u]*inv[n-1]%mod*p[n-sz[j]-1]%mod*qmi(f[j],mod-2)%mod*p[sz[j]]%mod;
        // g[u]=f[u]*inv[sz[u]-1]%mod*p[n-sz[j]-1]%mod*p[sz[j]]%mod*qmi(f[j],mod-2)%mod*g[fa]%mod*inv[n-sz[u]]%mod;
        dfs2(j,u);
    }
}
int main()
{
//    int n;
    cin>>n;
    p[0]=1,inv[0]=1;
    for(int i=1;i<=n;i++)p[i]=(ll)p[i-1]*i%mod;
    for(int i=1;i<=n;i++)inv[i]=(ll)inv[i-1]*qmi(i,mod-2)%mod;
    memset(h,-1,sizeof h);
    for(int i=1;i<n;i++)
    {
        int a,b;
        cin>>a>>b;
        add(a,b);
        add(b,a);
    }
    dfs1(1,1);
    g[0]=1;
    dfs2(1,0);
    for(int i=1;i<=n;i++)cout<<ans[i]<<endl;
    return 0;
}