#include <bits/stdc++.h>
const long long mod = 1e9 + 7;
const int maxn = 1e2 + 10;
using namespace std;
int n, k;
int cnt_edge, head[maxn];
long long dp[maxn][maxn], f[maxn];
struct edge {
  int v, next;
} e[maxn << 1];
inline void adde(int u, int v) {
  e[cnt_edge].v = v;
  e[cnt_edge].next = head[u];
  head[u] = cnt_edge++;
}
void init() {
  cnt_edge = 0;
  memset(head, -1, sizeof(head));
}
inline void dfs(int u, int fa) {
  dp[u][0] = dp[u][k + 1] = 1;
  for (int i = head[u]; i != -1; i = e[i].next) {
    int v = e[i].v;
    if (v == fa) continue;
    dfs(v, u);
    for (int a = 0; a <= 2 * k; a++) f[a] = 0;
    for (int a = 0; a <= 2 * k; a++) {
      for (int b = 0; b <= 2 * k + 1; b++) {
        if (a + b <= 2 * k)
          f[min(a, b + 1)] += dp[u][a] * dp[v][b], f[min(a + 1, b)] %= mod;
        else
          f[max(a, b + 1)] += dp[u][a] * dp[v][b], f[max(a + 1, b)] %= mod;
      }
    }
    for (int a = 0; a <= 2 * k; a++) dp[u][a] = f[a];
  }
}
int main() {
  init();
  scanf("%d%d", &n, &k);
  int u, v;
  for (int i = 1; i < n; i++) {
    scanf("%d%d", &u, &v);
    adde(u, v);
    adde(v, u);
  }
  dfs(1, 0);
  long long ans = 0;
  for (int i = 0; i <= k; i++) ans += dp[1][i], ans %= mod;
  printf("%lld", ans % mod);
  return 0;
}
