#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
const int N = 110;
int n, k;
vector<int> g[N];
int f[N][2][21], t[2][21];
void dfs(int u, int fa) {
  f[u][0][0] = f[u][1][0] = 1;
  for (auto v : g[u])
    if (v != fa) {
      dfs(v, u);
      memset(t, 0, sizeof(t));
      for (int h1 = 0; h1 <= k; h1++)
        for (int h2 = 0; h2 <= k; h2++) {
          (t[0][min(h1, h2 + 1)] += 1ll * f[u][0][h1] * f[v][0][h2] % MOD) %=
              MOD;
          (t[1][max(h1, h2 + 1)] += 1ll * f[u][1][h1] * f[v][1][h2] % MOD) %=
              MOD;
          if (h1 + h2 + 1 <= k) {
            (t[0][h1] += 1ll * f[u][0][h1] * f[v][1][h2] % MOD) %= MOD;
            (t[0][h2 + 1] += 1ll * f[u][1][h1] * f[v][0][h2] % MOD) %= MOD;
          } else {
            (t[1][h1] += 1ll * f[u][1][h1] * f[v][0][h2] % MOD) %= MOD;
            (t[1][h2 + 1] += 1ll * f[u][0][h1] * f[v][1][h2] % MOD) %= MOD;
          }
        }
      memcpy(f[u], t, sizeof(t));
    }
}
int main() {
  scanf("%d%d", &n, &k);
  for (int i = 1, u, v; i < n; i++)
    scanf("%d%d", &u, &v), g[u].push_back(v), g[v].push_back(u);
  dfs(1, 0);
  int ans = 0;
  for (int i = 0; i <= k; i++) (ans += f[1][0][i]) %= MOD;
  printf("%d\n", ans);
  return 0;
}
