#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
int dp[102][22][22];
int ndp[22][22];
int main() {
  int n, k;
  cin >> n >> k;
  vector<vector<int>> g(n);
  for (int i = 0; i < n - 1; ++i) {
    int u, v;
    cin >> u >> v;
    g[u - 1].push_back(v - 1);
    g[v - 1].push_back(u - 1);
  }
  function<void(int, int)> dfs = [&](int u, int p) {
    for (int v : g[u]) {
      if (v == p) continue;
      dfs(v, u);
    }
    dp[u][0][k + 1] = 1;
    dp[u][k + 1][0] = 1;
    for (int v : g[u]) {
      if (v == p) continue;
      memset(ndp, 0, sizeof ndp);
      for (int a1 = 0; a1 <= k + 1; a1++)
        for (int ah = 0; ah <= k + 1; ah++)
          for (int b1 = 0; b1 <= k + 1; ++b1)
            for (int bh = 0; bh <= k + 1; bh++) {
              int na = 0, nb = 0, fnd = 0;
              na = min(a1, min(k + 1, b1 + 1));
              if (ah != k + 1 && ah + b1 + 1 > k) nb = ah, fnd = 1;
              if (bh != k + 1 && bh + 1 + a1 > k)
                nb = max(nb, min(k + 1, bh + 1)), fnd = 1;
              if (!fnd)
                nb = k + 1;
              else if (nb > k)
                continue;
              ndp[na][nb] =
                  (ndp[na][nb] + 1LL * dp[u][a1][ah] * dp[v][b1][bh]) % MOD;
            }
      for (int a = 0; a <= k + 1; ++a)
        for (int b = 0; b <= k + 1; ++b) dp[u][a][b] = ndp[a][b];
    }
  };
  dfs(0, -1);
  int ans = 0;
  for (int a = 0; a <= k; ++a) ans = (ans + dp[0][a][k + 1]) % MOD;
  cout << ans;
  return 0;
}
