#include<bits/stdc++.h>
#define ll long long
#define fi first
#define se second
using namespace std;
int inf = 1e9 + 1, mod = 1e9 + 7;
const int N = 405;
ll modpow(ll x, int p){
    ll ans = 1;
    for (int i = p; i; i >>= 1, x = x * x % mod) if (i & 1) ans = ans * x % mod;
    return ans;
}
ll f[N][N], frac[N]{1}, c[N][N], inv2[N];
ll C(int a, int b){
    return frac[a] * modpow(frac[b] * frac[a - b] % mod, mod - 2) % mod;
}
vector<int> g[N];
int lca[N][N], d[N]{};
int n;
void dfs(int u, int p){
    d[u] = ~p ? d[p] + 1 : 0;
    for (int i = 1; i <= n; i++) lca[i][u] = lca[u][i] = (~p ? lca[p][i] : u);
    lca[u][u] = u;
    for (int i : g[u]) if (i != p) dfs(i, u);
}
int main(){
    ios::sync_with_stdio(0), cin.tie(0);
    cin >> n;
    for (int i = 1; i <= n; i++) frac[i] = frac[i - 1] * i % mod;
    for (int i = 1; i <= n; i++) inv2[i] = modpow(modpow(2, i), mod - 2);
    for (int i = 0; i < n - 1; i++){
        int u, v;
        cin >> u >> v;
        g[u].push_back(v);
        g[v].push_back(u);
    }
    for (int i = 0; i < N; i++) for (int j = 0; j <= i; j++) c[i][j] = C(i, j);
    for (int i = 1; i <= n; i++) for (int j = 1; j <= n; j++){
        for (int k = 0; k < j; k++) f[i][j] += c[i + k - 1][k] * inv2[i + k], f[i][j] %= mod;
    }
    ll ans = 0;
    for (int i = 1; i <= n; i++){
        for (int &j : d) j = 0;
        dfs(i, -1);
        for (int j = 1; j <= n; j++) for (int k = 1; k < j; k++){
            int a = d[j] - d[lca[j][k]], b = d[k] - d[lca[j][k]];
            if (a == 0) ans ++;
            else if (b == 0) continue;
            else ans += f[a][b];
            if (ans >= mod) ans -= mod;
        }
    }
    cout << ans * modpow(n, mod - 2) % mod << '\n';
}