#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("O2,no-stack-protector,unroll-loops,fast-math")
const int maxn = 1e2 + 10, maxm = 20 + 10, lg = 12, mod = 1e9 + 7, inf = 1e18;
int n, k, tmp[maxm][maxm], dp[maxn][maxm][maxm];
vector<int> g[maxn];
void dfs(int v = 1, int p = 0) {
  for (int i = 1; i <= k; i++) dp[v][k + 1][i] = 1;
  for (int i = 1; i <= k + 1; i++) dp[v][0][i] = 1;
  for (auto u : g[v])
    if (u != p) {
      dfs(u, v);
      for (int bv = 1; bv <= k + 1; bv++)
        for (int pv = 0; pv <= k + 1; pv++)
          for (int pu = 0; pu <= k + 1; pu++) {
            int rbv = min({bv, pu + 1, k + 1}),
                rbu = min({bv + 1, pv + 1, k + 1}),
                tpv = min({pv, pu + 1, k + 1});
            tmp[tpv][bv] += 1ll * dp[v][pv][rbv] * dp[u][pu][rbu] % mod;
            if (tmp[tpv][bv] >= mod) tmp[tpv][bv] -= mod;
          }
      for (int i = 0; i <= k + 1; i++)
        for (int j = 0; j <= k + 1; j++) dp[v][i][j] = tmp[i][j], tmp[i][j] = 0;
    }
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> n >> k;
  for (int i = 1; i < n; i++) {
    int v, u;
    cin >> v >> u;
    g[v].push_back(u), g[u].push_back(v);
  }
  dfs();
  int ans = 0;
  for (int i = 0; i <= k; i++) {
    ans += dp[1][i][k + 1];
    if (ans >= mod) ans -= mod;
  }
  cout << ans;
  return 0;
}
