#include <bits/stdc++.h>
using namespace std;
const int MOD = int(1e9 + 7), maxK = 23, maxN = 107;
vector<int> a[maxN];
int n, k;
int f[maxN][maxK][maxK], g[2][maxK][maxK];
inline void add(int &a, long long b) { a = (a + b) % MOD; }
void calculate(int u, int par) {
  memset(g, 0, sizeof g);
  bool first = true;
  int G = 1, nj, np, cur = 1, prev = 0;
  memset(g[cur], 0, sizeof g[cur]);
  g[cur][k + 1][1] = 1;
  for (int v : a[u])
    if (v != par) {
      int sg = 0;
      swap(cur, prev);
      memset(g[cur], 0, sizeof g[cur]);
      for (int j = 0; j <= k + 1; j++)
        for (int p = 0; p <= k + 1; p++) {
          if (p <= k) add(sg, f[v][j][p]);
          for (int jj = 0; jj <= k + 1; jj++)
            for (int pp = 0; pp <= k + 1; pp++) {
              nj = min(j, jj + 1);
              if (jj + p > k)
                np = p;
              else
                np = 0;
              if (j + pp > k && pp > 0) np = max(np, pp + 1);
              add(g[cur][nj][np], 1LL * g[prev][j][p] * f[v][jj][pp]);
            }
        }
      G = (1LL * G * sg) % MOD;
    }
  g[cur][0][0] = G;
  for (int j = 0; j <= k + 1; j++)
    for (int p = 0; p <= k + 1; p++) {
      f[u][j][p] = g[cur][j][p];
    }
}
void visit(int u, int par = -1) {
  for (int v : a[u])
    if (v != par) {
      visit(v, u);
    }
  calculate(u, par);
}
int main() {
  scanf("%d%d", &n, &k);
  for (int i = 0; i < n - 1; i++) {
    int u, v;
    scanf("%d%d", &u, &v);
    a[u].push_back(v);
    a[v].push_back(u);
  }
  memset(f, 0, sizeof f);
  visit(1, -1);
  int res = 0;
  for (int j = 0; j <= k + 1; j++) add(res, f[1][j][0]);
  printf("%d\n", res);
  return 0;
}
