#include <bits/stdc++.h>
using namespace std;
#define endl "\n"
#define mst(a,b) memset((a),(b),sizeof(a))
#define rush() int TT;scanf("%d",&TT);for(int TTT=1;TTT<=TT;TTT++)
#define fastio() ios::sync_with_stdio(false),cin.tie(0),cout.tie(0)
#define forrr(i,x,y) for(int i=x;i<=y;++i)
#define rofff(i,x,y) for(int i=x;i>=y;--i)
#define forr(i,x,y) for(int i=x;i<y;++i)
#define roff(i,x,y) for(int i=x;i>y;--i)
#define lowbit(x) (x&-x)
#define fin freopen("in.txt","r",stdin)
#define fout freopen("out.txt","w",stdout)
#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define sf scanf
#define pf printf
typedef long long ll;
typedef unsigned long long ull;
typedef double db;
typedef long double ldb;
typedef pair<int, int> pii;
typedef pair<ll, int> pli;
typedef pair<ll, ll> pll;
typedef pair<string,int> psi;
const ldb pi = acos((ldb)-1);
int in(int &a,int &b,int &c,int &d) {
    return scanf("%d%d%d%d",&a,&b,&c,&d);
}
int in(int &a,int &b,int &c) {
    return scanf("%d%d%d",&a,&b,&c);
}
int in(int &a,int &b) {
    return scanf("%d%d",&a,&b);
}
int in(ll &a,ll &b) {
    return scanf("%lld%lld",&a,&b);
}
int in(ll &a,ll &b,ll &c,ll &d) {
    return scanf("%lld%lld%lld%lld",&a,&b,&c,&d);
}
int in(ll &a,ll &b,ll &c) {
    return scanf("%lld%lld%lld",&a,&b,&c);
}
int in(ll &a) {
    return scanf("%lld",&a);
}
int in(int &a) {
    return scanf("%d",&a);
}
int in(char *s) {
    return scanf("%s",s);
}
int in(char &c) {
    return scanf("%c",&c);
}
void out(int a,bool ln) {
    printf("%d%c",a," \n"[ln]);
}
void out(ll a,bool ln) {
    printf("%lld%c",a," \n"[ln]);
}
void out(db a,int digit,bool ln) {
    printf("%.*f%c",digit,a," \n"[ln]);
}
ll gcd(ll a, ll b) {
    return b?gcd(b,a%b):a;
}
ll lcm(ll a, ll b) {
    return a/gcd(a,b)*b;
}
const int inf = 0x3f3f3f3f;
const db eps = 1e-8;
const int maxn = 2e5+10;
const int maxm = 1e6+5;
const ll mod = 1e9+7;
vector<int> g[maxn];
int depth[maxn],value[maxn],first[maxn],len,st[2000][20];
ll inv[505],dp[505][505];

inline int calc(int x,int y) {//返回x和y深度较低的点
    return depth[x]<depth[y]?x:y;
}
void dfs(int u,int f,int d) {
    value[++len]=u;//欧拉序
    depth[len]=d;//深度
    first[u]=len;//点u在欧拉序第一次出现的位置
    for(auto v:g[u]) {
        if(v==f)
            continue;
        dfs(v,u,d+1);
        value[++len]=u;
        depth[len]=d;
    }
}
void init(int root) {
    len=0;
    dfs(root,0,1);
    forrr(i,1,len) st[i][0]=i;
    for(int j=1; (1<<j)<=len; j++)
        for(int i=1; i+(1<<j)-1<=len; i++)
            st[i][j]=calc(st[i][j-1],st[i+(1<<(j-1))][j-1]);//st表
}
int query(int x,int y) {
    int l=first[x],r=first[y];
    if(l>r) swap(l,r);
    int k=log2(r-l+1);
    return value[calc(st[l][k],st[r-(1<<k)+1][k])];
}


int main() {
    inv[1]=1;
    for(int i=2; i<=500; i++)
        inv[i]=(ll)(mod-mod/i)*inv[mod%i]%mod;
    int n;
    in(n);
    forrr(i,1,n){
        dp[0][i]=1;
        dp[i][0]=0;
    }
    forrr(j,1,n){
        forrr(i,1,n){
            dp[i][j]=(dp[i-1][j]+dp[i][j-1])%mod*inv[2]%mod;
        }
    }
    forr(i,1,n) {
        int u,v;
        in(u,v);
        g[u].pb(v);
        g[v].pb(u);
    }
    ll ans=0;
    forrr(root,1,n) {
        ll p=0,q=1;
        init(root);
        forrr(i,2,n) {
            forr(j,1,i) {
                int u=query(i,j);
                if(u==i) {
                    ans=(ans+1)%mod;
                } else if(u==j) {
                    continue;
                } else {
                    ll x=depth[first[i]]-depth[first[u]],y=depth[first[j]]-depth[first[u]];
                    ans=(ans+dp[x][y]%mod)%mod;
                }
            }
        }
    }
    out(ans*inv[n]%mod,1);
    return 0;
}
