import sys MAX_N = 200005 MOD = 1000000007 sys.setrecursionlimit(MAX_N) def make(): fac[0] = fac[1] = 1 finv[0] = finv[1] = 1 inv[1] = 1 for i in range(2, MAX_N): inv[i] = MOD - inv[MOD % i] * (MOD // i) % MOD fac[i] = fac[i-1] * i % MOD finv[i] = finv[i-1] * inv[i] % MOD def comb(a, b): if a < b: return 0 return fac[a] * finv[b] * finv[a-b] % MOD def dfs(u, p, depth): d[depth] += 1 if depth % 1000 == 0: print(depth) for v in G[u]: if v != p: dfs(v, u, depth + 1) if __name__ == '__main__': n = int(sys.stdin.readline()) G = [[] for _ in range(n)] fac, finv, inv, d= [0]*MAX_N, [0]*MAX_N, [0]*MAX_N, [0]*MAX_N for i in range(n-1): u, v = map(int, sys.stdin.readline().split()) G[u-1].append(v-1), G[v-1].append(u-1) make() dfs(0, -1, 1) ans = 0 for i in range(1, n+1): ans += fac[n-i]*fac[i-1]*d[i]*comb(n, i) % MOD print(ans % MOD)