#include <bits/stdc++.h>
using namespace std;
const long long MXN = 100 + 10;
const long long Mod = 1e9 + 7;
void mkay(long long &x) {
  if (x >= Mod) x -= Mod;
}
long long n, k;
long long sub[MXN], DP[MXN];
long long dp[MXN][MXN][2], pd[MXN][2];
vector<long long> adj[MXN];
vector<pair<long long, long long>> A, B;
void DFS(long long u, long long par) {
  sub[u] = dp[u][k][0] = dp[u][0][1] = 1;
  for (auto v : adj[u]) {
    if (v == par) continue;
    DFS(v, u);
    A.clear(), B.clear();
    for (int i = 0; i < sub[u]; i++) A.emplace_back(i, 1);
    for (int i = 0; i < sub[v]; i++) B.emplace_back(i, 1);
    for (long long i = max(0ll, k - sub[u]); i <= k; i++) A.emplace_back(i, 0);
    for (long long i = max(0ll, k - sub[v]); i <= k; i++) B.emplace_back(i, 0);
    for (auto Pr0 : A) {
      long long x, a, f, s;
      tie(x, a) = Pr0;
      for (auto Pr1 : B) {
        long long y, b;
        tie(y, b) = Pr1;
        if (a == 0 && b == 0) {
          f = max(x, y - 1), s = 0;
        } else if (a == 0 && b == 1) {
          if (x - 1 >= y)
            f = x, s = 0;
          else
            f = y + 1, s = 1;
        } else if (a == 1 && b == 0) {
          if (y - 1 >= x)
            f = y - 1, s = 0;
          else
            f = x, s = 1;
        } else {
          f = max(x, y + 1), s = 1;
        }
        mkay(pd[f][s] += dp[u][x][a] * dp[v][y][b] % Mod);
      }
    }
    sub[u] += sub[v];
    for (int f = 0; f <= sub[u]; f++) dp[u][f][1] = pd[f][1], pd[f][1] = 0;
    for (int f = max(0ll, k - sub[u]); f <= k; f++)
      dp[u][f][0] = pd[f][0], pd[f][0] = 0;
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> k;
  for (int i = 1; i < n; i++) {
    long long u, v;
    cin >> u >> v;
    adj[u].push_back(v), adj[v].push_back(u);
  }
  DFS(1, 0);
  for (int f = 0; f <= k; f++) {
    mkay(DP[k] += dp[1][f][0]);
  }
  cout << DP[k] << '\n';
  return 0;
}
