#include <bits/stdc++.h>
using namespace std;
const int maxn = 109;
const long long mod = 1000000007;
int n, d;
vector<int> neigh[maxn];
long long f[maxn][maxn], g[maxn][maxn];
long long tmp_f[maxn];
long long tmp_g[maxn];
void dfs(int v, int p) {
  f[v][0] = 1;
  g[v][0] = 1;
  for (int u : neigh[v]) {
    if (u == p) continue;
    dfs(u, v);
    memset(tmp_f, 0, sizeof tmp_f);
    memset(tmp_g, 0, sizeof tmp_g);
    for (int k = 0; k <= d; k++) {
      for (int kk = 0; kk <= d; kk++) {
        long long mult;
        mult = (f[v][k] * f[u][kk]) % mod;
        tmp_f[min(k, kk + 1)] = (tmp_f[min(k, kk + 1)] + mult) % mod;
        mult = (f[v][k] * g[u][kk]) % mod;
        if (k + kk + 1 <= d) {
          tmp_f[k] = (tmp_f[k] + mult) % mod;
        } else {
          tmp_g[kk + 1] = (tmp_g[kk + 1] + mult) % mod;
        }
        mult = (g[v][k] * f[u][kk]) % mod;
        if (k + kk + 1 <= d) {
          tmp_f[kk + 1] = (tmp_f[kk + 1] + mult) % mod;
        } else {
          tmp_g[k] = (tmp_g[k] + mult) % mod;
        }
        mult = (g[v][k] * g[u][kk]) % mod;
        tmp_g[max(k, kk + 1)] = (tmp_g[max(k, kk + 1)] + mult) % mod;
        if (v == 2 && tmp_g[1] > 0) {
        }
      }
    }
    for (int k = 0; k <= d; k++) {
      f[v][k] = tmp_f[k];
      g[v][k] = tmp_g[k];
    }
  }
}
int main() {
  scanf("%d %d", &n, &d);
  for (int i = 0; i < n - 1; i++) {
    int u, v;
    scanf("%d %d", &u, &v);
    neigh[u].push_back(v);
    neigh[v].push_back(u);
  }
  dfs(1, 0);
  long long ans = 0;
  for (int k = 0; k <= d; k++) {
    ans = (ans + f[1][k]) % mod;
  }
  cout << ans;
}
