#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
int n, k, head[110], nextt[210], to[210], tot = 1, f[110][85], ans;
void add(int x, int y) {
  to[tot] = y;
  nextt[tot] = head[x];
  head[x] = tot++;
}
void dfs(int u, int fa) {
  f[u][0] = f[u][k + 1] = 1;
  int tmp[85];
  for (int i = head[u]; i; i = nextt[i]) {
    memset(tmp, 0, sizeof(tmp));
    int v = to[i];
    if (v == fa) continue;
    dfs(v, u);
    for (int j = 0; j <= 2 * k; j++)
      for (int l = 0; l <= 2 * k; l++) {
        if (j + l <= 2 * k)
          tmp[min(j, l + 1)] =
              (tmp[min(j, l + 1)] + 1LL * f[u][j] * f[v][l] % mod) % mod;
        else
          tmp[max(j, l + 1)] =
              (tmp[max(j, l + 1)] + 1LL * f[u][j] * f[v][l] % mod) % mod;
      }
    for (int j = 0; j <= 2 * k; j++) f[u][j] = tmp[j];
  }
}
int main() {
  scanf("%d%d", &n, &k);
  for (int i = 1; i < n; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    add(x, y);
    add(y, x);
  }
  dfs(1, 0);
  for (int i = 0; i <= k; i++) ans = (ans + f[1][i]) % mod;
  printf("%d\n", ans);
  return 0;
}
