#include <bits/stdc++.h>
using namespace std;
char _buf[1048576], *_is = _buf, *_it = _buf;
inline char rdc() {
  if (_is == _it) _it = (_is = _buf) + fread(_buf, 1, 1048576, stdin);
  return *_is++;
}
inline void rdi(int &x) {
  int f = 0;
  register char ch = rdc();
  while ((ch < '0' or ch > '9') and (ch ^ '-')) ch = rdc();
  if (ch == '-') f = 1, ch = rdc();
  while (ch >= '0' and ch <= '9')
    x = (x << 3) + (x << 1) + (ch ^ '0'), ch = rdc();
  if (f) x = -x;
}
inline void rdi(long long &x) {
  long long f = 0;
  register char ch = rdc();
  while ((ch < '0' or ch > '9') and (ch ^ '-')) ch = rdc();
  if (ch == '-') f = 1, ch = rdc();
  while (ch >= '0' and ch <= '9')
    x = (x << 3) + (x << 1) + (ch ^ '0'), ch = rdc();
  if (f) x = -x;
}
inline void write(int x) {
  if (x < 0) putchar('-'), x = -x;
  if (x > 9) write(x / 10);
  putchar(x % 10 + '0');
}
inline void _write(int x) {
  write(x);
  putchar(' ');
}
inline void print(int x) {
  write(x);
  putchar('\n');
}
inline void write(long long x) {
  if (x < 0) putchar('-'), x = -x;
  if (x > 9) write(x / 10);
  putchar(x % 10 + '0');
}
inline void _write(long long x) {
  write(x);
  putchar(' ');
}
inline void print(long long x) {
  write(x);
  putchar('\n');
}
struct edge {
  int nxt, to;
} e[222];
int head[110];
int cnt;
inline void add(int u, int v) {
  e[++cnt].to = v;
  e[cnt].nxt = head[u];
  head[u] = cnt;
}
int dp[222][222];
int k, n;
int dp2[222];
const int md = 1000000007;
inline void upd(int &a, int b) {
  a += b;
  if (a >= md) a -= md;
}
inline void dfs(int u, int par) {
  dp[u][0] = dp[u][k + 1] = 1;
  for (int i = head[u]; i; i = e[i].nxt) {
    int v = e[i].to;
    if (v == par) continue;
    dfs(v, u);
    memset(dp2, 0, sizeof(dp2));
    for (int j = 0; j <= 2 * k; ++j) {
      for (int f = 0; f <= 2 * k; ++f) {
        if (f + j <= 2 * k)
          upd(dp2[min(f + 1, j)], (1ll * dp[u][j] * dp[v][f]) % md);
        else
          upd(dp2[max(f + 1, j)], (1ll * dp[u][j] * dp[v][f]) % md);
      }
    }
    for (int j = 0; j <= 2 * k + 1; ++j) dp[u][j] = dp2[j];
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int i, j;
  scanf("%d%d", &n, &k);
  for (i = 1; i < n; ++i) {
    int u, v;
    scanf("%d%d", &u, &v);
    add(u, v), add(v, u);
  }
  dfs(1, 0);
  int ans = 0;
  for (i = 0; i <= k; ++i) upd(ans, dp[1][i]);
  printf("%d\n", ans);
  return 0;
}
