#include <bits/stdc++.h>
using namespace std;
const int N = 100 + 5;
const int K = 20 + 5;
const int MOD = 1000000007;
const int INF = 1 << 30;
vector<int> G[N];
int64_t dp[N][K][K << 1], tmp[K][K << 1];
void dfs(int, int, int);
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n, k;
  cin >> n >> k;
  for (int i = 0; i < n - 1; i++) {
    int u, v;
    cin >> u >> v;
    u--, v--;
    G[u].push_back(v);
    G[v].push_back(u);
  }
  dfs(0, 0, k);
  int64_t ans = 0;
  for (int i = -1; i <= 2 * k; i++) ans = (ans + dp[0][0][i + 1]) % MOD;
  cout << ans << '\n';
  return 0;
}
void dfs(int u, int f, int k) {
  dp[u][0][1] = 1;
  dp[u][1][0] = 1;
  for (auto v : G[u]) {
    if (v == f) continue;
    dfs(v, u, k);
    memset(tmp, 0, sizeof(tmp));
    for (int w1 = -1; w1 <= k; w1++)
      for (int b1 = -1; b1 <= 2 * k; b1++) {
        for (int w = -1; w <= k; w++)
          for (int b = -1; b <= 2 * k; b++) {
            int w2 = w < 0 ? -1 : w + 1, b2 = b < 0 ? INF : b + 1;
            int nw = max(w1, w2), nb = min(b1 < 0 ? INF : b1, b2);
            int64_t cur = (dp[u][w1 + 1][b1 + 1] * dp[v][w + 1][b + 1]) % MOD;
            if (nb == INF)
              tmp[nw + 1][0] = (tmp[nw + 1][0] + cur) % MOD;
            else if (nw + nb <= k)
              tmp[0][nb + 1] = (tmp[0][nb + 1] + cur) % MOD;
            else
              tmp[nw + 1][nb + 1] = (tmp[nw + 1][nb + 1] + cur) % MOD;
          }
      }
    for (int a = 0; a <= k + 2; a++)
      for (int b = 0; b <= 2 * k + 2; b++) {
        dp[u][a][b] = tmp[a][b];
      }
  }
}
