#include <bits/stdc++.h>
using namespace ::std;
const int maxn = 100 + 10;
const int mod = 1e9 + 7;
int n, k;
long long dp[maxn][30][30], h[30][30];
vector<vector<int> > e;
void init() {
  scanf("%d%d", &n, &k);
  e.resize(n + 1);
  for (int i = 1; i < n; i++) {
    int u, v;
    scanf("%d%d", &u, &v);
    e[v].push_back(u);
    e[u].push_back(v);
  }
}
void dfs(int u, int p) {
  dp[u][1][k + 1] = dp[u][0][0] = 1;
  for (auto v : e[u]) {
    if (v == p) continue;
    dfs(v, u);
    for (int i = 0; i <= k + 1; i++)
      for (int j = 0; j <= k + 1; j++) {
        h[i][j] = dp[u][i][j];
        dp[u][i][j] = 0;
      }
    for (int i = 0; i <= k + 1; i++)
      for (int j = 0; j <= k + 1; j++)
        if (h[i][j])
          for (int p = 0; p <= k + 1; p++)
            for (int q = 0; q <= k + 1; q++) {
              (dp[u][max(i, p + 1)][min(j, q + 1)] +=
               h[i][j] * dp[v][p][q] % mod) %= mod;
            }
  }
  for (int i = 0; i <= k + 1; i++)
    for (int j = 0; j <= k + 1; j++) {
      h[i][j] = dp[u][i][j];
      dp[u][i][j] = 0;
    }
  for (int i = 0; i <= k + 1; i++)
    for (int j = 0; j <= k + 1; j++)
      if (i + j <= k + 1) {
        (dp[u][0][j] += h[i][j]) %= mod;
      } else {
        (dp[u][i][j] += h[i][j]) %= mod;
      }
}
void solve() {
  if (k == 0) {
    puts("1");
    return;
  }
  dfs(1, 0);
  int ans = 0;
  for (int i = 0; i <= k + 1; i++) (ans += dp[1][0][i]) %= mod;
  printf("%d\n", ans);
}
int main() {
  init();
  solve();
  return 0;
}
