#include <bits/stdc++.h>
template <class T>
void Swap(T& a, T& b) {
  T c = a;
  a = b;
  b = c;
}
template <class T>
T max(T& a, T& b) {
  return a < b ? b : a;
}
template <class T>
T min(T& a, T& b) {
  return a > b ? b : a;
}
using namespace std;
int h[110 << 1], last[110 << 1], head[110], l;
int n, k, x, y, f[2][110][25], f0[25], f1[25], ans;
void Add(int& x, int y) {
  x += y;
  if (x >= 1000000007) x -= 1000000007;
  if (x < 0) x += 1000000007;
}
void add(int x, int y) {
  h[++l] = y;
  last[l] = head[x];
  head[x] = l;
}
void dfs(int x, int fa) {
  f[0][x][0] = f[1][x][0] = 1;
  for (int i = head[x], y; i; i = last[i]) {
    if ((y = h[i]) == fa) continue;
    dfs(y, x);
    memset(f0, 0, sizeof f0);
    memset(f1, 0, sizeof f1);
    for (int w = 0; w <= k; w++)
      for (int j = 0; j <= k; j++)
        Add(f0[min(w, j + 1)], (long long)f[0][x][w] * f[0][y][j] % 1000000007);
    for (int w = 0; w <= k; w++)
      for (int j = 0; j <= k; j++)
        if (w + j + 1 <= k)
          Add(f0[w], (long long)f[0][x][w] * f[1][y][j] % 1000000007);
        else
          Add(f1[j + 1], (long long)f[0][x][w] * f[1][y][j] % 1000000007);
    for (int w = 0; w <= k; w++)
      for (int j = 0; j <= k; j++)
        if (w + j + 1 <= k)
          Add(f0[j + 1], (long long)f[1][x][w] * f[0][y][j] % 1000000007);
        else
          Add(f1[w], (long long)f[1][x][w] * f[0][y][j] % 1000000007);
    for (int w = 0; w <= k; w++)
      for (int j = 0; j <= k; j++)
        Add(f1[max(w, j + 1)], (long long)f[1][x][w] * f[1][y][j] % 1000000007);
    memcpy(f[0][x], f0, sizeof(f0));
    memcpy(f[1][x], f1, sizeof(f1));
  }
}
int main() {
  scanf("%d%d", &n, &k);
  for (int i = 2; i <= n; i++) {
    scanf("%d%d", &x, &y);
    add(x, y);
    add(y, x);
  }
  dfs(1, 0);
  for (int i = 0; i <= k; i++) Add(ans, f[0][1][i]);
  printf("%d", ans);
  return 0;
}
