#include <bits/stdc++.h>
using namespace std;
vector<int> tu[120];
long long dp[120][70], zs[120], biaoji[120];
long long n, k;
long long mod = 1e9 + 7;
void dfs(int gen) {
  if (biaoji[gen]) return;
  biaoji[gen] = 1;
  dp[gen][0] = dp[gen][k + 1] = 1;
  for (int a = 0; a < tu[gen].size(); a++) {
    if (biaoji[tu[gen][a]]) continue;
    dfs(tu[gen][a]);
    memset(zs, 0, sizeof(zs));
    for (int b = 0; b <= 2 * k; b++) {
      for (int c = 0; c <= 2 * k; c++) {
        if (b + c <= 2 * k) {
          zs[min(b, c + 1)] += dp[gen][b] * dp[tu[gen][a]][c] % mod;
          zs[min(b, c + 1)] %= mod;
        } else {
          zs[max(b, c + 1)] += dp[gen][b] * dp[tu[gen][a]][c] % mod;
          zs[max(b, c + 1)] %= mod;
        }
      }
    }
    for (int b = 0; b <= 2 * k; b++) dp[gen][b] = zs[b];
  }
}
int main() {
  cin >> n >> k;
  long long q, w;
  for (long long a = 1; a < n; a++) {
    cin >> q >> w;
    tu[q].push_back(w);
    tu[w].push_back(q);
  }
  dfs(1);
  long long gs = 0;
  for (long long a = 0; a <= k; a++) gs = (gs + dp[1][a]) % mod;
  cout << (gs + mod) % mod << endl;
}
