import sys readline = sys.stdin.readline from collections import deque def bfs(G, s, N): Q = deque([]) dist = [-1] * N par = [-1] * N sz = [1] * N dist[s] = 0 rev = [0] * N for u in G[s]: par[u] = s dist[u] = 1 sz[u] += sz[s] Q.append(u) while Q: u = Q.popleft() for v in G[u]: if dist[v] != -1: continue if v < u: rev[v] = rev[u] + 1 else: rev[v] = rev[u] dist[v] = dist[u] + 1 par[v] = u sz[v] += sz[u] Q.append(v) return dist mod = 10 ** 9 + 7 n = 205050 fact = [1] * (n + 1) invfact = [1] * (n + 1) for i in range(1, n): fact[i + 1] = ((i+1) * fact[i]) % mod invfact[n] = pow(fact[n], mod - 2, mod) for i in range(n - 1, -1, -1): invfact[i] = invfact[i + 1] * (i + 1) % mod def comb(n, r): if n < 0 or r < 0 or n - r < 0: return 0 return fact[n] * invfact[r] * invfact[n - r] % mod N = int(readline()) G = [[] for i in range(N)] for i in range(N - 1): u, v = map(int, readline().split()) u, v = u - 1, v - 1 G[u].append(v) G[v].append(u) D = bfs(G, 0, N) ans = 0 for i in range(N): ans += comb(N, D[i] + 1) * fact[D[i]] * fact[N - D[i] - 1] ans %= mod print(ans)