#include <bits/stdc++.h>
using namespace std;
#define N 505
#define Mod 1000000007ll
#define ll long long
int f[N][25], lg[N], vet[N<<1], nxt[N<<1], head[N];
int dep[N], cnt;
ll dp[N][N], ans, n;
ll pow (ll a, ll b) {
	ll res = 1;
	for (; b; b>>=1, a=a*a%Mod) if (b&1) res = res*a%Mod;
	return res;
}
ll inv (ll x) {
	return pow (x, Mod - 2) % Mod;
}
void add (int u, int v) {
	vet[++cnt] = v;
	nxt[cnt] = head[u];
	head[u] = cnt;
}
void dfs (int u, int fa) {
	f[u][0] = fa; dep[u] = dep[fa] + 1;
	for (int i = 1; i < 20; i++) f[u][i] = f[f[u][i-1]][i-1];
	for (int e = head[u]; e; e = nxt[e])
		if (vet[e] != fa) dfs (vet[e], u);
}

int LCA (int x, int y) {
	if (dep[x] < dep[y]) swap(x, y);
	for (int k = 19; k >= 0; k--) if (dep[x]-(1<<k) >= dep[y]) x = f[x][k];
	if (x == y) return x;
	for (int k = 19; k >= 0; k--) if(f[x][k] != f[y][k]) x = f[x][k], y = f[y][k];
	return f[x][0];
}

ll cost (int rt) {
	for (int i = 0; i <= 20; i++) f[rt][i] = 0;
	dep[0] = 0; dfs (rt, 0);
	ll ret = 0;
	for (int i = 1; i <= n; i++) for (int j = 1; j < i; j++) {
		int l = LCA (i, j);
		ret = (ret + dp[dep[i] - dep[l]][dep[j] - dep[l]]) % Mod;
	}
	return ret;
}
signed main () {
	cin >> n;
	for (int i = 1, u, v; i < n; i++) cin >> u >> v, add (u, v), add (v, u);
	for (int i = 1; i <= n; i++) dp[0][i] = 1;
	for (int i = 1; i <= n; i++) for (int j = 1; j <= n; j++)
		dp[i][j] = (dp[i][j-1] * inv (2ll) % Mod + dp[i-1][j] * inv (2ll) % Mod) % Mod;
//	for (int i = 1; i <= n; i++) lg[i] = lg[i-1] + (1 << lg[i-1] == i);
	for (int i = 1; i <= n; i++)
		ans = (ans + cost (i) * inv (n) % Mod) % Mod;
	cout << ans << endl;
	return 0;
}
