#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
vector<int> v[105];
long long dp[105][105];
int n, k;
void dfs(int p) {
  dp[p][0] = dp[p][k + 1] = 1;
  long long tmp[105];
  for (int t = 0; t < v[p].size(); t++) {
    if (dp[v[p][t]][0] == 0) {
      memset(tmp, 0, sizeof(tmp));
      int u = v[p][t];
      dfs(u);
      for (int i = 0; i <= k * 2; i++)
        for (int j = 0; j <= k * 2; j++) {
          if ((i + j + 1) / 2 <= k)
            tmp[min(i, j + 1)] =
                (tmp[min(i, j + 1)] + (dp[p][i] * dp[u][j]) % mod) % mod;
          else
            tmp[max(i, j + 1)] =
                (tmp[max(i, j + 1)] + (dp[p][i] * dp[u][j]) % mod) % mod;
        }
      for (int i = 0; i <= k * 2; i++) dp[p][i] = tmp[i];
    }
  }
}
int main() {
  while (scanf("%d%d", &n, &k) == 2) {
    for (int i = 1; i <= n; i++) v[i].clear();
    for (int i = 1; i < n; i++) {
      int uu, vv;
      scanf("%d%d", &uu, &vv);
      v[uu].push_back(vv);
      v[vv].push_back(uu);
    }
    memset(dp, 0, sizeof(dp));
    dfs(1);
    long long ans = 0;
    for (int i = 0; i <= k; i++) ans = (ans + dp[1][i]) % mod;
    printf("%lld\n", ans);
  }
}
