#include #define rep(i,n) for(int i=0;i ; const ll INF = 1e14; const int MOD = 1000000007; int n = 200005; vector> tree(n); vector depth(n,0); void dfs(int i,int p=-1,int d=0){ depth[d] ++; for(int c:tree[i]){ if(c==p) continue; dfs(c,i,d+1); } } long long modpow(long long a, long long b,long long mod){ bitset<30> bit(b); string s = bit.to_string(); long long ret = 1; for (int i = 0;i< s.length(); ++i){ ret = (ret * ret) % mod; if(s[i]-'0') ret = (ret * a) % mod; } return ret; } long long inverse(long long x,long long mod){ return modpow(x,mod-2,mod); } int main(){ cin >> n; rep(i,n-1){ int a,b; cin >> a >> b; --a;--b; tree[a].push_back(b); tree[b].push_back(a); } dfs(0); ll ans = 0; ll n_p = 1; for(ll i=1;i<=n;i++) n_p = (n_p * i)%MOD; for(ll i=0;i