#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:66777216")
typedef double LD;
using namespace std;
const int MO = 1000000007;
const int N = 100 + 5;
int n, k;
std::vector<int> graph[N];
const int K = 25;
int dp[N][K][K];
int d[K][K];
int add(int a, int b) {
  a += b;
  if (a >= MO) a -= MO;
  return a;
}
int mul(int a, int b) { return ((long long)a * b) % MO; }
void dfs(int v, int p) {
  for (int j = 0; j < (int)(((int)((graph[v]).size()))); ++j) {
    int to = graph[v][j];
    if (to == p) continue;
    dfs(to, v);
  }
  dp[v][1][0] = 1;
  dp[v][0][1] = 1;
  for (int j = 0; j < (int)(((int)((graph[v]).size()))); ++j) {
    int t = graph[v][j];
    if (t == p) continue;
    memset(d, 0, sizeof d);
    for (int bv = 0; bv < (int)(k + 3); ++bv) {
      for (int wv = 0; wv < (int)(k + 2); ++wv) {
        for (int bt = 0; bt < (int)(k + 3); ++bt) {
          for (int wt = 0; wt < (int)(k + 2); ++wt) {
            int b = 0, w = 0;
            if (bv) b = bv;
            if (bt && (b == 0 || bt + 1 < b)) b = bt + 1;
            if (wv && (bt == 0 || bt + wv - 1 > k)) w = wv;
            if (wt && (bv == 0 || bv + wt - 1 > k)) {
              if (w < wt + 1) w = wt + 1;
            }
            if (w <= k + 1) {
              b = min(b, k + 2);
              if (b == k + 2) w = max(w, 1);
              d[b][w] = ((long long)d[b][w] +
                         (long long)dp[v][bv][wv] * dp[t][bt][wt]) %
                        MO;
            }
          }
        }
      }
    }
    for (int b = 0; b < (int)(k + 3); ++b)
      for (int w = 0; w < (int)(k + 2); ++w) dp[v][b][w] = d[b][w];
  }
}
void solve() {
  cin >> n >> k;
  for (int i = 1; i <= (int)(n - 1); ++i) {
    int u, v;
    cin >> u >> v;
    graph[u].push_back(v);
    graph[v].push_back(u);
  }
  dfs(1, 0);
  int res = 0;
  for (int b = 1; b <= (int)(k + 1); ++b) {
    res = add(res, dp[1][b][0]);
  }
  cout << res << endl;
}
long long rd() { return ((long long)rand() << 16) + rand(); }
void testgen() {
  FILE* f = fopen("input.txt", "w");
  int n = 1000000;
  fprintf(f, "%d 1000000000\n", n);
  for (int i = 1; i <= (int)(n); ++i)
    fprintf(f, "%d ", rand() % 1000000000 + 1);
  fclose(f);
}
int main() {
  std::cout << std::fixed;
  std::cout.precision(12);
  std::cerr << std::fixed;
  std::cerr.precision(3);
  solve();
  return 0;
}
