#include <bits/stdc++.h>
using namespace std;
const int M = 1e2 + 15;
const int Q = 1e9 + 7;
int dp[M][M][M];
vector<int> G[M];
int sum(int a, int b) { return a + b >= Q ? a + b - Q : a + b; }
int mul(int a, int b) { return int((1LL * a * b) % Q); }
int k;
void dfs(int v, int p) {
  vector<int> ch;
  for (auto u : G[v]) {
    if (u == p) continue;
    ch.push_back(u);
    dfs(u, v);
  }
  for (int lvl = 0; lvl <= k; lvl++) {
    dp[v][0][lvl] = 1;
    for (auto t : ch) {
      int tmp = 0;
      for (int i = 0; i <= 2 * k; i++) tmp = sum(tmp, dp[t][i][k]);
      dp[v][0][lvl] = mul(dp[v][0][lvl], tmp);
    }
  }
  for (int up = 1; up <= 2 * k; up++) {
    for (int lvl = 0; lvl <= k; lvl++) {
      if (lvl == 0 && up > k) continue;
      dp[v][up][lvl] = 0;
      for (int i = 0; i < (int)ch.size(); i++) {
        int tmp1 = 1;
        for (int j = 0; j < i; j++) {
          int x = 0;
          for (int gl = up; gl <= 2 * k; gl++)
            x = sum(x, dp[ch[j]][gl][max(0, max(lvl - 1, k - up))]);
          tmp1 = mul(tmp1, x);
        }
        tmp1 = mul(tmp1, dp[ch[i]][up - 1][max(0, lvl - 1)]);
        for (int j = i + 1; j < (int)ch.size(); j++) {
          int x = 0;
          for (int gl = up - 1; gl <= 2 * k; gl++)
            x = sum(x, dp[ch[j]][gl][max(0, max(lvl - 1, k - up))]);
          tmp1 = mul(tmp1, x);
        }
        dp[v][up][lvl] = sum(tmp1, dp[v][up][lvl]);
      }
    }
  }
  if ((int)ch.size() == 0) {
    for (int lvl = 1; lvl <= k; lvl++) dp[v][k + 1][lvl] = 1;
  }
}
int main() {
  srand(time(NULL));
  cin.tie(0);
  ios_base::sync_with_stdio(0);
  int n;
  cin >> n >> k;
  for (int i = 0; i < n - 1; i++) {
    int s, f;
    cin >> s >> f;
    G[s].push_back(f);
    G[f].push_back(s);
  }
  dfs(1, -1);
  int ans = 0;
  for (int i = 0; i <= 2 * k; i++) ans = sum(ans, dp[1][i][0]);
  cout << ans << endl;
  return 0;
}
