#include <bits/stdc++.h>
using namespace std;
const int N = 110;
const long long mod = 1e9 + 7;
struct node {
  int nxt, ed;
} e[3 * N];
int head[N], num, n, k;
long long dp[N][2 * N], tmp[2 * N];
void add(int x, int y) {
  e[num].nxt = head[x];
  e[num].ed = y;
  head[x] = num++;
}
void init() {
  memset(head, -1, sizeof(head));
  num = 0;
}
void dfs(int u, int fa) {
  dp[u][0] = 1, dp[u][k + 1] = 1;
  for (int i = head[u]; ~i; i = e[i].nxt) {
    int v = e[i].ed;
    if (v == fa) continue;
    dfs(v, u);
    memset(tmp, 0, sizeof(tmp));
    for (int j = 0; j <= 2 * k + 1; j++) {
      for (int x = 0; x <= 2 * k; x++) {
        if (j + x <= 2 * k) {
          (tmp[min(j, x + 1)] += dp[u][j] * dp[v][x]) %= mod;
        } else {
          (tmp[max(j, x + 1)] += dp[u][j] * dp[v][x]) %= mod;
        }
      }
    }
    memcpy(dp[u], tmp, sizeof(tmp));
  }
}
int main() {
  int x, y;
  init();
  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, -1);
  long long ans = 0;
  for (int i = 0; i <= k; i++) {
    ans = (ans + dp[1][i]) % mod;
  }
  printf("%I64d\n", ans);
  return 0;
}
