import sys MAX_N = 200005 MOD = 1000000007 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(): stack = [-1, 0] while len(stack) > 1: cur, prv, depth = stack[-1], stack[-2], len(stack)-1 if visit[cur] == 0: d[depth] += 1 if visit[cur] == len(G[cur]): stack.pop() continue nx = G[cur][visit[cur]] if nx != prv: stack.append(nx) visit[cur] += 1 if __name__ == '__main__': n = int(sys.stdin.readline()) G = [[] for _ in range(n)] fac, finv, inv, d, visit = [0]*MAX_N, [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() 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)