#include <bits/stdc++.h>
using namespace std;
const long long mo = (long long)1e9 + 7;
const int N = 103;
const int M = 43;
vector<int> E[N];
long long dp[N][M];
long long f[M];
int n, k;
void dfs(int u, int fa) {
  dp[u][0] = dp[u][k + 1] = 1;
  for (auto v : E[u])
    if (v != fa) {
      dfs(v, u);
      memset((f), (0), sizeof(f));
      for (int i = (int)0; i < (int)k + k + 1; ++i)
        for (int j = (int)0; j < (int)k + k + 1; ++j) {
          if (i + j <= k + k)
            (f[min(i, 1 + j)] += dp[u][i] * dp[v][j] % mo) %= mo;
          else
            (f[max(i, 1 + j)] += dp[u][i] * dp[v][j] % mo) %= mo;
        }
      for (int i = (int)0; i < (int)k + k + 1; ++i) dp[u][i] = f[i];
    }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> n >> k;
  int u, v;
  for (int i = (int)0; i < (int)n + 1; ++i) E[i].clear();
  for (int i = (int)1; i < (int)n; ++i) {
    cin >> u >> v;
    E[u].push_back(v);
    E[v].push_back(u);
  }
  memset((dp), (0), sizeof(dp));
  dfs(1, 0);
  long long ans = 0;
  for (int i = (int)0; i < (int)k + 1; ++i) (ans += dp[1][i]) %= mo;
  cout << ans << endl;
  return 0;
}
