#include <bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
int n, ver[101], nxt[201], to[201], tot;
void addedge(int from, int t) {
  nxt[++tot] = ver[from];
  to[tot] = t;
  ver[from] = tot;
}
int f[101][22][22], k, dep[101];
int g[22][22];
int mul(int a, int b) { return (long long)a * b % mod; }
void add(int& a, int v) { a = (a + v) % mod; }
void addmul(int& a, int b, int c) { add(a, mul(b, c)); }
void dfs(int o) {
  f[o][1][k + 1] = 1;
  f[o][0][1] = 1;
  for (int i = ver[o]; i; i = nxt[i]) {
    if (dep[to[i]]) continue;
    dep[to[i]] = dep[o] + 1;
    dfs(to[i]);
    memset(g, 0, sizeof g);
    for (int deepest_not_covered_white = 0; deepest_not_covered_white <= k;
         deepest_not_covered_white++)
      for (int shallowest_black = 0; shallowest_black <= k + 1;
           shallowest_black++) {
        for (int deepest_not_covered_white2 = 0;
             deepest_not_covered_white2 <= k; deepest_not_covered_white2++)
          for (int shallowest_black2 = 0; shallowest_black2 <= k + 1;
               shallowest_black2++) {
            bool leftclear = false;
            bool rightclear = false;
            if (deepest_not_covered_white == 0 ||
                deepest_not_covered_white + shallowest_black2 - 1 <= k)
              leftclear = true;
            if (deepest_not_covered_white2 == 0 ||
                deepest_not_covered_white2 + shallowest_black - 1 <= k)
              rightclear = true;
            if (leftclear && !rightclear) {
              addmul(g[deepest_not_covered_white2 + 1]
                      [min(shallowest_black, shallowest_black2 + 1)],
                     f[o][deepest_not_covered_white][shallowest_black],
                     f[to[i]][deepest_not_covered_white2][shallowest_black2]);
            }
            if (!leftclear && rightclear) {
              addmul(g[deepest_not_covered_white]
                      [min(shallowest_black, shallowest_black2 + 1)],
                     f[o][deepest_not_covered_white][shallowest_black],
                     f[to[i]][deepest_not_covered_white2][shallowest_black2]);
            }
            if (!leftclear && !rightclear) {
              addmul(g[max(deepest_not_covered_white,
                           deepest_not_covered_white2 + 1)]
                      [min(shallowest_black, shallowest_black2 + 1)],
                     f[o][deepest_not_covered_white][shallowest_black],
                     f[to[i]][deepest_not_covered_white2][shallowest_black2]);
            }
            if (leftclear && rightclear) {
              addmul(g[0][min(shallowest_black, shallowest_black2 + 1)],
                     f[o][deepest_not_covered_white][shallowest_black],
                     f[to[i]][deepest_not_covered_white2][shallowest_black2]);
            }
          }
      }
    for (int ii = 0; ii <= k; ii++)
      for (int jj = 0; jj <= k + 1; jj++) f[o][ii][jj] = g[ii][jj];
  }
}
int main() {
  scanf("%d%d", &n, &k);
  for (int i = 1; i < n; i++) {
    int u, v;
    scanf("%d%d", &u, &v);
    addedge(u, v);
    addedge(v, u);
  }
  dfs(dep[1] = 1);
  int ans = 0;
  for (int i = 0; i <= k + 1; i++) add(ans, f[1][0][i]);
  printf("%d\n", ans);
  return 0;
}
