#include <bits/stdc++.h>
using namespace std;
const int N = 200;
const long long Base = 1e9 + 7;
long long dp[N][N], f[N][N], dp_1[N][N], f_1[N][N];
int n, k;
vector<int> ed[N];
void load() {}
void dfs(int u, int p) {
  dp[u][0] = 1;
  f[u][0] = 1;
  for (int v : ed[u]) {
    if (v == p) continue;
    dfs(v, u);
    for (int i = 0; i <= k; ++i)
      for (int j = 0; j <= k; ++j) {
        f_1[u][min(j + 1, i)] =
            (f_1[u][min(j + 1, i)] + f[u][i] * f[v][j]) % Base;
        dp_1[u][max(j + 1, i)] =
            (dp_1[u][max(j + 1, i)] + dp[u][i] * dp[v][j]) % Base;
        if (i + j + 1 <= k)
          f_1[u][j + 1] = (f_1[u][j + 1] + dp[u][i] * f[v][j]) % Base,
                     f_1[u][i] = (f_1[u][i] + f[u][i] * dp[v][j]) % Base;
        if (i + j + 1 > k)
          dp_1[u][i] = (dp_1[u][i] + dp[u][i] * f[v][j]) % Base,
          dp_1[u][j + 1] = (dp_1[u][j + 1] + f[u][i] * dp[v][j]) % Base;
      }
    for (int i = 0; i <= k; ++i)
      dp[u][i] = dp_1[u][i], dp_1[u][i] = 0, f[u][i] = f_1[u][i], f_1[u][i] = 0;
  }
}
void trungtt() {
  scanf("%d%d", &n, &k);
  for (int i = 1; i < n; ++i) {
    int u, v;
    scanf("%d%d", &u, &v);
    ed[u].push_back(v);
    ed[v].push_back(u);
  }
  dfs(1, 0);
  long long ans = 0;
  for (int i = 0; i <= k; ++i) ans = (ans + f[1][i]) % Base;
  printf("%lld", ans);
}
int main() {
  load();
  trungtt();
  return 0;
}
