#include <bits/stdc++.h>

using namespace std;

#define int long long

const int N = 1e3 + 10;
const int mod = 1e9 + 7;

int ver[N * 2], nex[N * 2], head[N], deep[N], father[N], siz[N], vis[N], son[N], top[N], tot, f[N][N], n;

inline void add(int x, int y)
{
    ver[++tot] = y;
    nex[tot] = head[x];
    head[x] = tot;
}

inline int fp(int a, int n)
{
    int res = 1;
    while (n)
    {
        if (n & 1) res = res * a % mod;
        a = a * a % mod;
        n >>= 1;
    }
    return res % mod;
}

inline int inv(int a)
{
    return fp(a, mod - 2);
}

int dfs1(int x, int fa, int dep)
{
    deep[x] = dep;
    father[x] = fa;
    siz[x] = 1;
    int maxson = -1;
    for (int i = head[x]; i; i = nex[i])
    {
        int y = ver[i];
        if (y == fa) continue;
        siz[x] += dfs1(y, x, dep + 1);
        if (siz[y] > maxson)
        {
            maxson = siz[y];
            son[x] = y;
        }
    }
    return siz[x];
}

void dfs2(int x, int tp)
{
    vis[x] = 1;
    top[x] = tp;
    if (!son[x]) return;
    dfs2(son[x], tp);
    for (int i = head[x]; i; i = nex[i])
    {
        int y = ver[i];
        if (!vis[y]) dfs2(y, y);
    }
}

inline void init(int root)
{
    memset(vis, 0, sizeof(vis));
    memset(son, 0, sizeof(son));
    dfs1(root, 0, 1);
    dfs2(root, root);
}

inline int lca(int x, int y)
{
    while (top[x] != top[y])
    {
        if (deep[top[x]] < deep[top[y]]) swap(x, y);
        x = father[top[x]];
    }
    return deep[x] < deep[y] ? x : y;
}

void debug()
{
    cout << "---------DEBUG--------" << endl;
    cout << "inv(2) = " << inv(2) << endl;
    init(2);
    cout << lca(4, 6) << endl;
    cout << "--------ENDEBUG-------" << endl;
    exit(0);
}

signed main()
{
    cin >> n;
    for (int i = 1, x, y; i <= n - 1; i++)
    {
        cin >> x >> y;
        add(x, y);
        add(y, x);
    }
    // debug();
    for (int i = 0; i <= n; i++)
    {
        for (int j = 0; j <= n; j++)
        {
            if (i == 0)
            {
                f[i][j] = 0;
            }
            else if (j == 0)
            {
                f[i][j] = 1;
            }
            else 
            {
                f[i][j] = (inv(2) * f[i - 1][j] % mod + inv(2) * f[i][j - 1] % mod) % mod;
            }
        }
    }
    int ans = 0;
    for (int i = 1; i <= n; i++)
    {
        init(i);
        for (int j = 1; j <= n; j++)
        {
            for (int k = j + 1; k <= n; k++)
            {
                int t = lca(j, k);
                ans += f[deep[j] - deep[t]][deep[k] - deep[t]] % mod;
                ans %= mod;
            }
        }
    }
    cout << ans * inv(n) % mod << endl;
    return 0;
}