#include <bits/stdc++.h>
using namespace std;
double safe_sqrt(double x) { return sqrt(max((double)0.0, x)); }
long long GI(long long& x) { return scanf("%lld", &x); }
const long long MN = 111;
const long long MOD = 1e9 + 7;
long long n, k;
vector<long long> ke[MN];
long long f[111][23][23];
long long g[111][23][23];
long long combineD(long long x, long long y) {
  if (x == 22) return y;
  if (y == 22) return x;
  return max(x, y);
}
void dfs(long long u, long long fu) {
  for (long long v : ke[u]) {
    if (v == fu) continue;
    dfs(v, u);
  }
  memset(g[0], 0, sizeof g[0]);
  g[0][22][0] = 1;
  g[0][0][22] = 1;
  long long cnt = 0;
  for (long long v : ke[u])
    if (v != fu) {
      cnt++;
      memset(g[cnt], 0, sizeof g[cnt]);
      for (long long d = (0), _b = (22); d <= _b; ++d)
        for (long long z = (0), _b = (22); z <= _b; ++z)
          if (g[cnt - 1][d][z]) {
            for (long long vd = (0), _b = (22); vd <= _b; ++vd)
              for (long long vz = (0), _b = (22); vz <= _b; ++vz)
                if (f[v][vd][vz]) {
                  long long newz = min(z, vz + 1);
                  long long newd = 22;
                  if (d != 22 && d + vz + 1 > k) newd = combineD(d, newd);
                  if (vd != 22 && vd + 1 + z > k) newd = combineD(vd + 1, newd);
                  if (newd != 22 && newd > k) continue;
                  g[cnt][newd][newz] =
                      (g[cnt][newd][newz] + g[cnt - 1][d][z] * f[v][vd][vz]) %
                      MOD;
                }
          }
    }
  for (long long d = (0), _b = (22); d <= _b; ++d)
    for (long long z = (0), _b = (22); z <= _b; ++z) f[u][d][z] = g[cnt][d][z];
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout << (fixed) << setprecision(9);
  while (cin >> n >> k) {
    memset(f, 0, sizeof f);
    for (long long i = (1), _b = (n); i <= _b; ++i) ke[i].clear();
    for (long long i = (2), _b = (n); i <= _b; ++i) {
      long long u, v;
      cin >> u >> v;
      ke[u].push_back(v);
      ke[v].push_back(u);
    }
    dfs(1, 0);
    long long res = 0;
    for (long long z = (0), _b = (22); z <= _b; ++z)
      res = (res + f[1][22][z]) % MOD;
    cout << res << endl;
  }
}
