#include <bits/stdc++.h>
const int N = 105;
const int K = 45;
const long long MOD = 1e9 + 7;
long long f[N][K], exp_mem[K];
std::vector<int> edge[N];
int n, k;
void dfs(int u, int fa = -1) {
  f[u][0] = 1, f[u][k + 1] = 1;
  for (auto v : edge[u]) {
    if (v == fa) continue;
    dfs(v, u);
    memset(exp_mem, 0x00, sizeof(exp_mem));
    for (int i = 0; i <= (k << 1); ++i) {
      for (int j = 0; j <= (k << 1); ++j) {
        int position =
            i + j <= (k << 1) ? std::min(i, j + 1) : std::max(i, j + 1);
        exp_mem[position] += f[u][i] * f[v][j];
        exp_mem[position] %= MOD;
      }
    }
    memcpy(f[u], exp_mem, sizeof(exp_mem));
  }
}
int main() {
  std::ios::sync_with_stdio(false);
  std::cin >> n >> k;
  for (int i = 1, u, v; i < n; ++i) {
    std::cin >> u >> v;
    edge[u].push_back(v);
    edge[v].push_back(u);
  }
  dfs(1);
  int ans = 0;
  for (int i = 0; i <= k; ++i) ans += f[1][i], ans %= MOD;
  std::cout << ans << std::endl;
  return 0;
}
