#include <bits/stdc++.h>

using namespace std;

const int MOD = 1e9+7;

int64_t gcdExtended(int64_t a, int64_t b, int64_t* x, int64_t* y) { 
  if (a == 0) { 
    *x = 0, *y = 1; 
    return b; 
  } 
  int64_t x1, y1;
  int64_t gcd = gcdExtended(b % a, a, &x1, &y1); 
  *x = y1 - (b / a) * x1; 
  *y = x1;   
  return gcd; 
} 

int64_t modInverse(int64_t a) { 
  int64_t x, y; 
  gcdExtended(a, MOD, &x, &y); 
  return (x % MOD + MOD) % MOD; 
} 

vector<int> get_parents(const vector<vector<int>>& adj, int root, vector<int>& depth) {
  int n = adj.size();
  vector<int> parents(n);
  stack<pair<int, int>> st;
  st.emplace(root, -1);
  while (!st.empty()) {
    int node = st.top().first;
    int par = st.top().second;
    parents[node] = par;
    depth[node] = (par >= 0) ? (depth[par] + 1) : 0;
    st.pop();
    for (int other : adj[node]) {
      if (other != par) {
	st.emplace(other, node);
      }
    }
  }
  return parents;
}

vector<vector<int>> get_children(const vector<int>& parents) {
  int n = parents.size();
  vector<vector<int>> children(n);
  for (int i = 0; i < n; ++i) {
    if (parents[i] >= 0) {
      children[parents[i]].push_back(i);
    }
  }
  return children;
}

int modmult(int x, int y) {
  return (x * int64_t(y)) % MOD;
}

int modadd(int x, int y) {
  int result = x+y;
  if (result >= MOD) result -= MOD;
  return result;
}

int factorials[1000];
int invfact[1000];

int get_num_orders(const vector<vector<int>>& children, int root) {
  int n = children.size();
  vector<int> nums(n);
  vector<int> subsize(n);
  stack<pair<bool, int>> st;
  st.emplace(true, root);
  while (!st.empty()) {
    bool b = st.top().first;
    int node = st.top().second;
    st.pop();
    if (b) {
      st.emplace(false, node);
      for (int child : children[node]) {
	st.emplace(true, child);
      }
    }
    else {
      subsize[node] = 1;
      nums[node] = 1;
      for (int child : children[node]) {
	subsize[node] += subsize[child];
	nums[node] = modmult(nums[node], modmult(nums[child], invfact[subsize[child]]));
      }
      nums[node] = modmult(nums[node], factorials[subsize[node]-1]);
    }
  }
  return nums[root];
}

void floydWarshall(vector<vector<int>>& m) {
  int n = m.size();
  for (int i = 0; i < n; ++i) m[i][i] = min(m[i][i], 0);
  for (int k = 0; k < n; ++k) {
    for (int i = 0; i < n; ++i) {
      for (int j = 0; j < n; ++j) {
	if (m[i][k] != INT_MAX && m[k][j] != INT_MAX) {
	  auto newDist = max(m[i][k] + m[k][j], INT_MIN);
	  m[i][j] = min(m[i][j], newDist);
	}
      }
    }
  }
  for (int k = 0; k < n; ++k) {
    if (m[k][k] < 0) {
      for (int i = 0; i < n; ++i) {
	for (int j = 0; j < n; ++j) {
	  if (m[i][k] != INT_MAX && m[k][j] != INT_MAX) {
	    m[i][j] = INT_MIN;
	  }
	}
      }
    }
  }
}

int solve(const vector<pair<int, int>>& edges) {
  factorials[0] = 1;
  invfact[0] = 1;
  for (int i = 1; i < 1000; ++i) {
    factorials[i] = modmult(factorials[i-1], i);
    invfact[i] = modInverse(factorials[i]);
  }
  int n = edges.size()+1;
  vector<vector<int>> adj(n);
  for (const pair<int, int>& edge : edges) {
    adj[edge.first].push_back(edge.second);
    adj[edge.second].push_back(edge.first);
  }
  vector<int> inverses(1000, -1);
  for (int i = 1; i < int(inverses.size()); ++i) {
    inverses[i] = modInverse(i);
  }
  vector<vector<int>> dist(n, vector<int>(n, INT_MAX));
  for (int i = 0; i < n; ++i) {
    dist[i][i] = 0;
    for (int j : adj[i]) {
      dist[i][j] = 1;
    }
  }
  floydWarshall(dist);
  int ans = 0;
  vector<vector<int>> pr(n, vector<int>(n));
  for (int i = 0; i < n; ++i) {
    pr[0][i] = 0;
    pr[i][0] = 1;
  }
  for (int i = 1; i < n; ++i) {
    for (int j = 1; j < n; ++j) {
      pr[i][j] = modmult(modadd(pr[i-1][j], pr[i][j-1]), inverses[2]);
    }
  }
  vector<int> depth(n);
  for (int i = 0; i < n; ++i) {
    vector<int> parents = get_parents(adj, i, depth);
    for (int j1 = 0; j1 < n; ++j1) {
      for (int j2 = j1+1; j2 < n; ++j2) {
	int lca_depth = (depth[j1] + depth[j2] - dist[j1][j2]) / 2;
	int d1 = depth[j1] - lca_depth;
	int d2 = depth[j2] - lca_depth;
	ans = modadd(ans, pr[d1][d2]);
      }
    }
  }
  ans = modmult(ans, inverses[n]);
  return ans;
}

int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  vector<pair<int, int>> edges(n-1);
  for (int i = 0; i < n-1; ++i) {
    cin >> edges[i].first >> edges[i].second;
    --edges[i].first;
    --edges[i].second;
  }
  cout << solve(edges) << endl;
}
