#include <bits/stdc++.h>
using namespace std;
const int MAXN = 220;
const int P = 1E9 + 7;
int n, k;
vector<int> g[MAXN];
int f[MAXN][MAXN], t[MAXN];
void dfs(int u, int p) {
  f[u][0] = f[u][k + 1] = 1;
  for (int v : g[u])
    if (v != p) {
      dfs(v, u);
      memcpy(t, f[u], sizeof t);
      memset(f[u], 0, sizeof f[u]);
      for (int i = 0; i <= 2 * k; i++)
        for (int j = 0; j <= 2 * k; j++) {
          int& st = i + j <= 2 * k ? f[u][min(i, j + 1)] : f[u][max(i, j + 1)];
          st = (st + 1ll * t[i] * f[v][j]) % P;
        }
    }
}
int main() {
  scanf("%d%d", &n, &k);
  for (int i = 1; i < n; i++) {
    int u, v;
    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 = (ans + f[1][i]) % P;
  printf("%d\n", ans);
  return 0;
}
