#include <bits/stdc++.h>
using namespace std;
const long long mm = 1000000007;
const long long inf = 1e18;
long long read() {
  long long x = 0, f = 1;
  char ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (isdigit(ch)) {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
long long f[2][105][22], fl[22], fw[22];
int n, k;
vector<int> e[105];
void dfs(int u, int fa) {
  f[0][u][0] = f[1][u][0] = 1;
  for (int ci = 0; ci < (int)e[u].size(); ci++) {
    int v = e[u][ci];
    if (v == fa) continue;
    dfs(v, u);
    memset(fw, 0, sizeof(fw));
    memset(fl, 0, sizeof(fl));
    for (int i = 0; i <= k; i++) {
      for (int j = 0; j <= k; j++)
        fw[min(i, j + 1)] += f[0][u][i] * f[0][v][j] % mm;
      for (int j = 0; j <= k; j++) {
        if (i + j + 1 <= k)
          fw[i] += f[0][u][i] * f[1][v][j] % mm;
        else
          fl[j + 1] += f[0][u][i] * f[1][v][j] % mm;
      }
      for (int j = 0; j <= k; j++) {
        if (i + j + 1 <= k)
          fw[j + 1] += f[1][u][i] * f[0][v][j] % mm;
        else
          fl[i] += f[1][u][i] * f[0][v][j];
      }
      for (int j = 0; j <= k; j++)
        fl[max(i, j + 1)] += f[1][u][i] * f[1][v][j] % mm;
    }
    for (int i = 0; i <= k; i++)
      f[0][u][i] = fw[i] % mm, f[1][u][i] = fl[i] % mm;
  }
}
int main() {
  n = read();
  k = read();
  for (int i = 1; i <= n - 1; i++) {
    int x = read(), y = read();
    e[x].push_back(y);
    e[y].push_back(x);
  }
  dfs(1, 0);
  long long ans = 0;
  for (int i = 0; i <= k; i++) ans = (ans + f[0][1][i]) % mm;
  printf("%lld\n", ans);
  return 0;
}
