#include <bits/stdc++.h>
using namespace std;
const int maxn = 105, mo = int(1e9) + 7;
vector<int> lk[maxn];
int f[maxn][45], n, k;
void dfs(int now, int pre) {
  static int g[45];
  f[now][0] = 1, f[now][k + 1] = 1;
  for (auto p : lk[now])
    if (p != pre) {
      dfs(p, now);
      memset(g, 0, sizeof g);
      for (int x = 0; x <= (k << 1 | 1); x++)
        for (int y = 0; y <= (k << 1); y++) {
          int v = f[now][x] * 1ll * f[p][y] % mo;
          if (x + y <= (k << 1))
            (g[min(x, y + 1)] += v) %= mo;
          else
            (g[max(x, y + 1)] += v) %= mo;
        }
      memcpy(f[now], g, sizeof f[now]);
    }
}
int main() {
  cin >> n >> k;
  for (int i = 1; i < n; i++) {
    int u, v;
    cin >> u >> v;
    lk[u].push_back(v), lk[v].push_back(u);
  }
  dfs(1, 0);
  int ans = 0;
  for (int d = 0; d <= k; d++) ans = (ans + f[1][d]) % mo;
  cout << ans << endl;
  return 0;
}
