#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()); vector depth(n,0); void dfs(int i,int p=-1,int d=0){ depth[i] = d; for(int c:tree[i]){ if(c==p) continue; dfs(c,i,d+1); } } const int MAX = 1000000; long long fac[MAX], finv[MAX], inv[MAX]; void init() { fac[0] = fac[1] = 1; inv[1] = 1; for (int i = 2; i < MAX; i++){ fac[i] = fac[i - 1] * i % MOD; inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD; } } int main(){ init(); 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; rep(i,n){ ans = (ans + inv[depth[i]+1])%MOD; } ans = (ans * fac[n])%MOD; cout << ans << endl; return 0; }