#include #include using namespace std; typedef long long ll; vector G[200010]; ll d[200010],mod = 1000000007,inv[200010],ans = 0; void solve(){ inv[1] = 1; for(int i=2;i<=200000;i++){ inv[i] = mod - (mod/i)*inv[mod%i]%mod; } } void dfs(int s, int p){ for(int v:G[s]){ if(v==p) continue; d[v] = d[s] + 1; dfs(v,s); } } int main(){ int i,n; cin >> n; for(i=0;i> a >> b; a--; b--; G[a].push_back(b); G[b].push_back(a); } d[0] = 1; dfs(0,-1); solve(); ll f = 1; for(i=2;i<=n;i++){ (f *= i) %= mod; } for(i=0;i