#include <bits/stdc++.h>
using namespace std;
constexpr int mod = 1e9 + 7;
int n, ans, k, dp[110][30][30], dp1[110][30][30];
vector<vector<int> > gr;
void dfs(int u, int par) {
  dp[u][k + 1][0] = 1;
  for (auto v : gr[u]) {
    if (v == par) {
      continue;
    }
    dfs(v, u);
    memset(dp1[u], 0, sizeof dp[u]);
    for (int cu = 1; cu <= k + 1; ++cu) {
      for (int bu = 0; bu <= k; ++bu) {
        for (int cv = 0; cv <= k + 1; ++cv) {
          for (int bv = 0; bv < k; ++bv) {
            int maxb, minc;
            minc = min(cu, cv + 1);
            if (!bv and cv <= k) {
              maxb = bu;
            } else {
              maxb = max(bu, bv + 1);
            }
            if (maxb + minc <= k) {
              maxb = 0;
            }
            dp1[u][minc][maxb] += (1LL * dp[u][cu][bu] * dp[v][cv][bv]) % mod;
            dp1[u][minc][maxb] %= mod;
          }
        }
      }
    }
    memcpy(dp[u], dp1[u], sizeof dp[u]);
  }
  for (int cu = 1; cu <= k + 1; ++cu) {
    for (int bu = 0; bu <= k; ++bu) {
      dp[u][0][0] += dp[u][cu][bu];
      dp[u][0][0] %= mod;
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cin >> n >> k;
  vector<int> vi;
  gr.resize(n, vi);
  for (int i = 0; i < n - 1; ++i) {
    int u, v;
    cin >> u >> v;
    --u, --v;
    gr[u].push_back(v);
    gr[v].push_back(u);
  }
  if (k == 0) {
    cout << 1;
    return 0;
  }
  dfs(0, -1);
  for (int i = 0; i <= k; ++i) {
    ans += dp[0][i][0];
    ans %= mod;
  }
  cout << ans << "\n";
}
