#include     <bits/stdc++.h>
#ifndef      CONVICTION
#define      debug(x...)
#endif
#define IOS  ios_base::sync_with_stdio(false); cin.tie (nullptr)
#define PREC cout.precision (10); cout << fixed
#define F    first
#define S    second
#define int  long long
#define ff   long double
using namespace std;
//Don’t practice until you get it right. Practice until you can’t get it wrong

void preproc() { }

void solve()
{
   const int Mod = (int)1e9 + 7;
   
   auto pw = [Mod] (int x, int y) {
      int res = 1;
      while ( y ) {
         if ( y & 1ll ) res = res*x % Mod;
         x = x*x % Mod;
         y /= 2;
      }
      return res;
   };
   
   const int inf = INT_MAX;
   const int invMod2 = pw(2, Mod-2);
   
   int n;
   cin >> n;
   
   vector <vector <int>> d(n+1, vector <int> (n+1, inf));
   for (int i = 1; i <= n; ++i)
      d[i][i] = 0;
   
   for (int e = 1; e <= n-1; ++e) {
      int u, v; cin >> u >> v;
      d[u][v] = d[v][u] = 1; // edge (u-v)
   }
   
   // find the shortest path between (u, v)
   for (int k = 1; k <= n; ++k) 
      for (int i = 1; i <= n; ++i) 
         for (int j = 1; j <= n; ++j) 
            if ( d[i][k] != inf and d[j][k] != inf ) 
               d[j][i] = d[i][j] =
                  min(d[i][j], d[i][k] + d[j][k]);
                  
   /* Pr(x, y) -> x finishes before y
      * Pr(0, 0) = 0, Pr(1, 0) = 0 (not possible)
      * Pr(0, 1) = 1 (already finished)
      */
   vector <vector <int>> Pr(n, vector <int> (n));
   for (int x = 0; x <= n-1; ++x) {
      for (int y = 0; y <= n-1; ++y) {
         if ( y == 0 ) // not possible 
            Pr[x][y] = 0;
         else if ( x == 0 )
            Pr[x][y] = 1;
         else 
            Pr[x][y] = (Pr[x][y-1] + Pr[x-1][y])*invMod2 % Mod;
      }
   }
   
   int res_exp = 0;
   for (int r = 1; r <= n; ++r) { // choose root, lca matters
      for (int i = 1; i <= n; ++i) 
         for (int j = i+1; j <= n; ++j)  
            {
               int len = (d[i][r] + d[j][r] - d[i][j]) / 2;
               int xj = d[j][r] - len;
               int xi = d[i][r] - len;
               /* j > i, j should appear before i */
               ( res_exp += Pr[xj][xi] ) %= Mod;
            }
   }
   cout << res_exp*pw(n, Mod-2) % Mod << '\n';
   return;
}

signed main()
{
   IOS; PREC;
   preproc();

   int tc = 1;
   // cin >> tc;
   for (int Tt = 1; Tt <= tc; ++Tt) {
      // debug(Tt);
      // cout << "Case #" << Tt << ": ";
      solve();
   }
   return EXIT_SUCCESS;
}
