#include <bits/stdc++.h>
int f[105][25][25], g[25][25], n, k, u, v;
std::vector<int> ch[105];
using ll = long long;
const int mod = 1e9 + 7;
void dfs(int u, int fa) {
  f[u][0][1] = f[u][k][0] = 1;
  for (int v : ch[u]) {
    if (v == fa) continue;
    dfs(v, u);
    std::memcpy(g, f[u], sizeof(f[u]));
    std::memset(f[u], 0, sizeof(f[u]));
    for (int a = 0; a <= k; ++a)
      for (int b = 0; b <= k; ++b)
        for (int c = 0; c <= k; ++c)
          for (int d = 0; d <= k; ++d) {
            int d1 = b, d2 = d;
            if (d1 <= c) d1 = 0;
            if (d2 <= a) d2 = 0;
            int i = std::max(a, c - 1);
            int j = std::max(d1, d2 + (d2 != 0));
            if (j <= k)
              f[u][i][j] = (f[u][i][j] + (ll)g[a][b] * f[v][c][d] % mod) % mod;
          }
  }
}
int main() {
  scanf("%d%d", &n, &k);
  for (int i = 1; i < n; ++i) {
    scanf("%d%d", &u, &v);
    ch[u].push_back(v);
    ch[v].push_back(u);
  }
  dfs(1, 0);
  int ans = 0;
  for (int i = 0; i <= k; ++i) ans = (ans + f[1][i][0]) % mod;
  printf("%d", ans);
  return 0;
}
