#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100;
const int MAXK = 20;
const int MOD = 1e9 + 7;
struct node {
  int v;
  node *next;
} Edges[MAXN * 2 + 10], *ecnt = Edges, *adj[MAXN + 10];
int dp[MAXN + 10][MAXK + 2][MAXK + 2], g[2][MAXK + 2][MAXK + 2], n, k;
void addedge(int u, int v) {
  ++ecnt;
  ecnt->v = v;
  ecnt->next = adj[u];
  adj[u] = ecnt;
}
void dfs(int u, int fa) {
  for (node *p = adj[u]; p; p = p->next) {
    if (p->v == fa) continue;
    dfs(p->v, u);
  }
  memset(g, 0, sizeof g);
  g[0][0][k + 1] = 1;
  for (node *p = adj[u]; p; p = p->next) {
    if (p->v == fa) continue;
    swap(g[0], g[1]);
    memset(g[0], 0, sizeof g[0]);
    int i, j, x, y;
    for (i = 0; i <= k + 1; i++)
      for (j = 0; j <= k + 1; j++)
        for (x = 0; x <= k + 1; x++)
          for (y = 0; y <= k + 1; y++) {
            int tx = min(max(i + y <= k ? 0 : i, j + x <= k ? 0 : x), k + 1),
                ty = min(j, y);
            g[0][tx][ty] =
                (g[0][tx][ty] + 1ll * g[1][i][j] * dp[p->v][x][y]) % MOD;
          }
  }
  for (int i = 0; i <= k; i++) {
    for (int j = 0; j <= k + 1; j++) {
      if (i == 0 && j <= k)
        dp[u][i][min(j + 1, k + 1)] =
            (dp[u][i][min(k + 1, j + 1)] + g[0][i][j]) % MOD;
      else
        dp[u][i + 1][min(j + 1, k + 1)] =
            (dp[u][i + 1][min(k + 1, j + 1)] + g[0][i][j]) % MOD;
      dp[u][0][1] = (dp[u][0][1] + g[0][i][j]) % MOD;
    }
  }
}
int main() {
  int u, v;
  scanf("%d%d", &n, &k);
  for (int i = 1; i < n; i++) {
    scanf("%d%d", &u, &v);
    addedge(u, v);
    addedge(v, u);
  }
  dfs(1, 0);
  int ans = 0;
  for (int i = 0; i <= k + 1; i++) ans = (ans + dp[1][0][i]) % MOD;
  printf("%d\n", ans);
  return 0;
}
