#include <bits/stdc++.h>
const int mu = 1e9 + 7;
int dp[105][50], to[205], edge, Next[205], last[105], t[50], n, k, x, y;
void add(int x, int y) {
  to[++edge] = y;
  Next[edge] = last[x];
  last[x] = edge;
}
void merge(int *x, int *y) {
  memset(t, 0, sizeof(t));
  for (int i = 0; i <= 2 * k; i++)
    for (int j = 0; j <= 2 * k; j++) {
      int tran;
      if (i + j <= 2 * k)
        tran = std::min(i, j + 1);
      else
        tran = std::max(i, j + 1);
      t[tran] = (t[tran] + 1ll * x[i] * y[j]) % mu;
    }
  for (int i = 0; i <= 2 * k; i++) x[i] = t[i];
}
void dfs(int x, int fa) {
  dp[x][0] = dp[x][k + 1] = 1;
  for (int i = last[x]; i; i = Next[i]) {
    int u = to[i];
    if (u == fa) continue;
    dfs(u, x);
    merge(dp[x], dp[u]);
  }
}
int main() {
  scanf("%d%d", &n, &k);
  for (int i = 1; i < n; i++) {
    scanf("%d%d", &x, &y);
    add(x, y), add(y, x);
  }
  dfs(1, 0);
  int sum = 0;
  for (int i = 0; i <= k; i++) sum = (sum + dp[1][i]) % mu;
  printf("%d\n", sum);
}
