#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
int n, m, head[105], cnt;
long long dp[105][105], f[105];
struct w {
  int v, next;
} e[205];
void add(int u, int v) {
  e[++cnt].v = v;
  e[cnt].next = head[u];
  head[u] = cnt;
}
void dfs(int u, int fa) {
  dp[u][0] = dp[u][m + 1] = 1;
  for (int i = head[u]; ~i; i = e[i].next) {
    int v = e[i].v;
    if (v != fa) {
      dfs(v, u);
      int tmp;
      memset(f, 0, sizeof(f));
      for (int j = 0; j <= 2 * m; j++)
        for (int k = 0; k <= 2 * m; k++) {
          if (j + k <= 2 * m) {
            tmp = min(j, k + 1);
            f[tmp] += dp[u][j] * dp[v][k];
            f[tmp] %= mod;
          } else {
            tmp = max(j, k + 1);
            f[tmp] += dp[u][j] * dp[v][k];
            f[tmp] %= mod;
          }
        }
      for (int i = 0; i <= 2 * m; i++) dp[u][i] = f[i];
    }
  }
}
int main() {
  memset(head, -1, sizeof(head));
  int u, v;
  scanf("%d%d", &n, &m);
  for (int i = 1; i < n; i++) {
    scanf("%d%d", &u, &v);
    add(u, v);
    add(v, u);
  }
  dfs(1, 0);
  long long ans = 0;
  for (int i = 0; i <= m; i++) ans = (ans + dp[1][i]) % mod;
  printf("%lld\n", ans);
}
