#include <bits/stdc++.h>
using namespace std;
template <class T>
bool cmax(T &x, T y) {
  return y > x ? x = y, 1 : 0;
}
template <class T>
bool cmin(T &x, T y) {
  return y < x ? x = y, 1 : 0;
}
const int N = 105, K = 45, mod = 1e9 + 7;
int n, k, f[N][K], t[K];
vector<int> to[N];
void dfs(int x, int pre) {
  f[x][0] = 1, f[x][k + 1] = 1;
  for (auto y : to[x])
    if (y ^ pre) {
      dfs(y, x);
      memset(t, 0, sizeof t);
      for (int i = 0; i <= 2 * k; ++i)
        for (int j = 0; j <= 2 * k; ++j)
          (t[i + j <= 2 * k ? min(i, j + 1) : max(i, j + 1)] +=
           1ll * f[x][i] * f[y][j] % mod) %= mod;
      memcpy(f[x], t, sizeof t);
    }
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n >> k;
  for (int i = 1, x, y; i < n; ++i)
    cin >> x >> y, to[x].push_back(y), to[y].push_back(x);
  dfs(1, 0);
  int ans = 0;
  for (int i = 0; i <= k; ++i) (ans += f[1][i]) %= mod;
  cout << ans << endl;
  return 0;
}
