#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
int N, K;
struct EdgeNode {
  int next, to;
} edge[110 << 1];
int head[110], cnt = 1;
inline void AddEdge(int u, int v) {
  cnt++;
  edge[cnt].next = head[u];
  head[u] = cnt;
  edge[cnt].to = v;
}
inline void InsertEdge(int u, int v) {
  AddEdge(u, v);
  AddEdge(v, u);
}
long long dp[110][21 << 1], tmp[21 << 1], ans;
inline void DFS(int now, int last) {
  dp[now][0] = dp[now][K + 1] = 1LL;
  for (int i = head[now]; i; i = edge[i].next)
    if (edge[i].to != last) {
      DFS(edge[i].to, now);
      memset(tmp, 0, sizeof(tmp));
      for (int j = 0; j <= 2 * K + 1; j++)
        for (int k = 0; k <= 2 * K; k++)
          if (j + k <= 2 * K)
            (tmp[min(j, k + 1)] +=
             dp[now][j] * dp[edge[i].to][k] % 1000000007) %= 1000000007;
          else
            (tmp[max(j, k + 1)] +=
             dp[now][j] * dp[edge[i].to][k] % 1000000007) %= 1000000007;
      memcpy(dp[now], tmp, sizeof(dp[now]));
    }
}
int main() {
  N = read(), K = read();
  for (int i = 1, u, v; i <= N - 1; i++)
    u = read(), v = read(), InsertEdge(u, v);
  DFS(1, 0);
  for (int i = 0; i <= K; i++) ans = (ans + dp[1][i]) % 1000000007;
  printf("%I64d\n", ans);
  return 0;
}
