#include <bits/stdc++.h>
using namespace std;
const long long base = 1000000000 + 7;
int n, k;
vector<int> e[111];
long long f[2][111][22][22];
int parent[111];
void setlink(int u, int v) {
  e[u].push_back(v);
  e[v].push_back(u);
}
void dfs(int u) {
  memset(f[0][u], 0, sizeof(f[0][u]));
  f[0][u][0][1] = 1;
  f[0][u][1][k + 1] = 1;
  for (int i = 0; i <= int(e[u].size()) - 1; i++) {
    int v = e[u][i];
    if (v != parent[u]) {
      parent[v] = u;
      dfs(v);
      memset(f[1][u], 0, sizeof(f[1][u]));
      for (int j = 0; j <= k; j++)
        for (int t = 0; t <= k + 1; t++)
          if (f[0][u][j][t]) {
            for (int nj = 0; nj <= k; nj++)
              for (int nt = 0; nt <= k + 1; nt++)
                if (f[0][v][nj][nt]) {
                  int st = min(t, nt + 1);
                  int sj = max((j + nt <= k + 1 ? 0 : j),
                               (nj + t <= k + 1 ? 0 : nj + 1));
                  f[1][u][sj][st] =
                      (f[1][u][sj][st] + f[0][u][j][t] * f[0][v][nj][nt]) %
                      base;
                }
          }
      for (int j = 0; j <= k; j++)
        for (int t = 0; t <= k + 1; t++) f[0][u][j][t] = f[1][u][j][t];
    }
  }
}
int main() {
  cin >> n >> k;
  for (int i = 1; i <= n - 1; i++) {
    int u, v;
    cin >> u >> v;
    setlink(u, v);
  }
  memset(parent, 0, sizeof(parent));
  dfs(1);
  long long ans = 0;
  for (int t = 0; t <= k + 1; t++) ans = (ans + f[0][1][0][t]) % base;
  cout << ans << endl;
  return 0;
}
