local mod = 1000000007 local mfl = math.floor local function bmul(x, y) local x1, y1 = mfl(x / 31623), mfl(y / 31623) local x0, y0 = x - x1 * 31623, y - y1 * 31623 return (x1 * y1 * 14122 + (x1 * y0 + x0 * y1) * 31623 + x0 * y0) % mod end local function badd(x, y) return (x + y) % mod end local n = io.read("*n") local edge = {} local len = {} for i = 1, n do edge[i] = {} len[i] = -1 end for i = 1, n - 1 do local u, v = io.read("*n", "*n") edge[u][v], edge[v][u] = true, true end len[1] = 0 local tasks = {1} for i = 1, n do local src = tasks[i] for dst, _u in pairs(edge[src]) do if len[dst] < 0 then len[dst] = len[src] + 1 table.insert(tasks, dst) end end end local f = 1 local invs = {1} for i = 2, n do f = bmul(f, i) invs[i] = bmul(mfl(mod / i), mod - invs[mod % i]) end local ret = 0 for i = 1, n do ret = badd(ret, invs[1 + len[i]]) end print(bmul(ret, f))