#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
long long dp[110][22][22], tmp[22][22];
int n, k, u, v;
vector<int> E[110];
void dfs(int u, int fa) {
  dp[u][1][k + 1] = 1;
  dp[u][0][0] = 1;
  for (int i = 0; i < E[u].size(); i++) {
    int v = E[u][i];
    if (v == fa) continue;
    dfs(v, u);
    for (int p = 0; p <= k + 1; p++) {
      for (int q = 0; q <= k + 1; q++) {
        tmp[p][q] = dp[u][p][q], dp[u][p][q] = 0;
      }
    }
    for (int p = 0; p <= k + 1; p++) {
      for (int q = 0; q <= k + 1; q++) {
        if (tmp[p][q]) {
          for (int s = 0; s <= k; s++) {
            for (int t = 0; t <= k + 1; t++) {
              (dp[u][max(p, s + 1)][min(q, t + 1)] +=
               tmp[p][q] * dp[v][s][t] % MOD) %= MOD;
            }
          }
        }
      }
    }
  }
  for (int p = 0; p <= k + 1; p++) {
    for (int q = 0; q <= k + 1; q++) {
      tmp[p][q] = dp[u][p][q], dp[u][p][q] = 0;
    }
  }
  for (int p = 0; p <= k + 1; p++) {
    for (int q = 0; q <= k + 1; q++) {
      if (p + q <= k + 1)
        (dp[u][0][q] += tmp[p][q]) %= MOD;
      else
        (dp[u][p][q] += tmp[p][q]) %= MOD;
    }
  }
}
int main() {
  scanf("%d%d", &n, &k);
  for (int i = 1; i < n; i++) {
    scanf("%d%d", &u, &v);
    E[u].push_back(v);
    E[v].push_back(u);
  }
  if (k == 0) {
    printf("1\n");
    return 0;
  }
  dfs(1, 0);
  long long ret = 0;
  for (int i = 0; i <= k + 1; i++) {
    (ret += dp[1][0][i]) %= MOD;
  }
  printf("%lld\n", ret);
  return 0;
}
