#include <bits/stdc++.h>
using namespace std;
using LL = long long;
namespace _buff {
const size_t BUFF = 1 << 19;
char buff[BUFF], *begin = buff, *end = buff;
char getc() {
  if (begin == end) {
    begin = buff;
    end = buff + fread(buff, 1, BUFF, stdin);
  }
  return begin == end ? -1 : *begin++;
}
}  // namespace _buff
LL read() {
  using namespace _buff;
  LL ret = 0;
  bool pos = true;
  char c = getc();
  for (; (c < '0' || c > '9') && c != '-'; c = getc()) {
    assert(~c);
  }
  if (c == '-') {
    pos = false;
    c = getc();
  }
  for (; c >= '0' && c <= '9'; c = getc()) {
    ret = (ret << 3) + (ret << 1) + (c ^ 48);
  }
  return pos ? ret : -ret;
}
const size_t N = 100 + 5;
const int MOD = 1e9 + 7;
vector<int> graph[N];
int n, k, f[N][N];
void dfs(int u, int p = 0) {
  f[u][0] = f[u][k + 1] = 1;
  for (int v : graph[u]) {
    if (v == p) continue;
    dfs(v, u);
    static int tmp[N];
    memcpy(tmp, f[u], sizeof f[u]);
    memset(f[u], 0, sizeof f[u]);
    for (int i = 0; i <= 2 * k; ++i) {
      for (int j = 0; j <= 2 * k; ++j) {
        int &dp = f[u][i + j <= 2 * k ? min(i, j + 1) : max(i, j + 1)];
        dp = (dp + static_cast<LL>(tmp[i]) * f[v][j]) % MOD;
      }
    }
  }
}
int main() {
  n = read();
  k = read();
  for (int i = 1; i < n; ++i) {
    int u = read(), v = read();
    graph[u].emplace_back(v);
    graph[v].emplace_back(u);
  }
  dfs(1);
  int ans = 0;
  for (int i = 0; i <= k; ++i) {
    ans += f[1][i];
    if (ans >= MOD) ans -= MOD;
  }
  printf("%d\n", ans);
  return 0;
}
