#include <bits/stdc++.h>
using namespace std;
struct node {
  int to, nxt;
} edge[210];
int head[110], cnt, f[110][110], tmp[110];
int n, k, x, y, ans;
void addedge(int x, int y) {
  edge[++cnt].to = y;
  edge[cnt].nxt = head[x];
  head[x] = cnt;
}
void dfs(int x, int fa) {
  f[x][0] = f[x][k + 1] = 1;
  for (int i = head[x]; i; i = edge[i].nxt) {
    int upup = edge[i].to;
    if (upup == fa) continue;
    dfs(upup, x);
    memset(tmp, 0, sizeof(tmp));
    for (int i1 = 0; i1 <= 2 * k; i1++)
      for (int i2 = 0; i2 <= 2 * k; i2++)
        if (i1 + i2 <= k * 2)
          (tmp[min(i1, i2 + 1)] += 1ll * f[x][i1] * f[upup][i2] % 1000000007) %=
              1000000007;
        else
          (tmp[max(i1, i2 + 1)] += 1ll * f[x][i1] * f[upup][i2] % 1000000007) %=
              1000000007;
    for (int i = 0; i <= 2 * k; i++) f[x][i] = tmp[i];
  }
}
int main() {
  scanf("%d%d", &n, &k);
  for (int i = 1; i < n; i++) {
    scanf("%d%d", &x, &y);
    addedge(x, y);
    addedge(y, x);
  }
  dfs(1, 0);
  for (int i = 0; i <= k; i++) (ans += f[1][i]) %= 1000000007;
  printf("%d\n", ans);
}
