#include <bits/stdc++.h>
using namespace std;
const int N = 105, K = 25, P = 1e9 + 7;
int n, k, t[2 * K], dp[N][2 * K];
vector<int> G[N];
inline int read() {
  int f = 1, x = 0;
  char ch = getchar();
  while (ch > '9' || ch < '0') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return f * x;
}
inline void dfs(int u, int fa) {
  dp[u][0] = dp[u][k + 1] = 1;
  for (auto v : G[u])
    if (v ^ fa) {
      dfs(v, u);
      for (int i = (0), iend = (2 * k); i <= iend; i++) t[i] = 0;
      for (int i = (0), iend = (2 * k); i <= iend; i++)
        for (int j = (0), jend = (2 * k); j <= jend; j++)
          (t[i + j <= 2 * k ? min(i, j + 1) : max(i, j + 1)] +=
           1ll * dp[u][i] * dp[v][j] % P) %= P;
      for (int i = (0), iend = (2 * k); i <= iend; i++) dp[u][i] = t[i];
    }
}
int main() {
  n = read(), k = read();
  for (int i = (2), iend = (n); i <= iend; i++) {
    int x = read(), y = read();
    G[x].push_back(y), G[y].push_back(x);
  }
  dfs(1, 0);
  int ans = 0;
  for (int i = (0), iend = (k); i <= iend; i++) ans = (ans + dp[1][i]) % P;
  printf("%d", ans);
  return 0;
}
