#include <bits/stdc++.h>
using namespace std;
#pragma(comment, "\STACK:1024000000,1024000000")
int fst[120], vv[800020], nxt[800020], e;
int dp[120][25][25], f[25][25];
int n, K;
void upd(int &x, int y) {
  x += y;
  if (x >= 1000000007) x -= 1000000007;
}
void init() {
  memset(fst, -1, sizeof fst);
  e = 0;
}
void add(int u, int v) { vv[e] = v, nxt[e] = fst[u], fst[u] = e++; }
void dfs(int u, int p) {
  dp[u][0][0] = 1;
  dp[u][K + 1][1] = 1;
  for (int i = fst[u]; ~i; i = nxt[i]) {
    int v = vv[i];
    if (v == p) continue;
    dfs(v, u);
    memset(f, 0, sizeof f);
    for (int j = 0; j <= K + 1; ++j)
      for (int k = 0; k <= K + 1; ++k)
        for (int jj = 0; jj <= K + 1; ++jj)
          for (int kk = 0; kk <= K + 1; ++kk) {
            int nk = 0;
            if (kk > 0 && j + kk > K) nk = max(nk, kk + 1);
            if (k > 0 && jj + k > K) nk = max(nk, k);
            upd(f[min(j, jj + 1)][nk],
                1LL * dp[u][j][k] * dp[v][jj][kk] % 1000000007);
          }
    memcpy(dp[u], f, sizeof f);
  }
}
int main() {
  scanf("%d%d", &n, &K);
  init();
  for (int i = 1; i < n; ++i) {
    int u, v;
    scanf("%d%d", &u, &v);
    add(u, v);
    add(v, u);
  }
  dfs(1, -1);
  int ans = 0;
  for (int i = 0; i <= K; ++i) {
    upd(ans, dp[1][i][0]);
  }
  printf("%d\n", ans);
  return 0;
}
