#include <bits/stdc++.h>
using namespace std;
const int maxn = 110;
const int maxk = 30;
const long long mod = 1e9 + 7;
int n, k;
long long dp[maxn][maxk][maxk], tdp[maxk][maxk], ans;
vector<int> g[maxn];
void Add(long long &x, long long y) {
  x += y;
  if (x >= mod) x -= mod;
}
void update(int u, int v) {
  for (int x = 0; x <= k + 1; x++)
    for (int y = 0; y <= k; y++)
      for (int xx = 0; xx <= k + 1; xx++)
        for (int yy = 0; yy <= k; yy++)
          Add(tdp[min(xx + 1, x)]
                 [max((!yy || x + yy <= k) ? 0 : yy + 1, xx + y <= k ? 0 : y)],
              dp[u][x][y] * dp[v][xx][yy] % mod);
}
void _copy(long long a[][maxk], long long b[][maxk]) {
  for (int i = 0; i <= k + 1; i++)
    for (int j = 0; j <= k; j++) a[i][j] = b[i][j];
}
void dfs(int u, int f) {
  dp[u][0][0] = dp[u][k + 1][1] = 1;
  for (int i = 0; i < g[u].size(); i++) {
    int v = g[u][i];
    if (v == f) continue;
    dfs(v, u);
    memset(tdp, 0, sizeof(tdp));
    update(u, v);
    _copy(dp[u], tdp);
  }
}
int main() {
  scanf("%d%d", &n, &k);
  for (int i = 2; i <= n; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    g[x].push_back(y), g[y].push_back(x);
  }
  dfs(1, 0);
  for (int i = 0; i <= k; i++) Add(ans, dp[1][i][0]);
  printf("%I64d\n", ans);
  return 0;
}
