#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
int n, K;
vector<int> g[105];
int dp[105][55], tmp[55], ma[105];
inline void add(int &x, int y) {
  x += y;
  if (x >= mod) x -= mod;
}
void go(int u, int fa) {
  dp[u][0] = 1, dp[u][K + 1] = 1;
  for (int i = 0; i < (int)g[u].size(); ++i) {
    int v = g[u][i];
    if (v == fa) continue;
    go(v, u);
    memset(tmp, 0, sizeof tmp);
    for (int j = 0; j <= 2 * K; ++j) {
      for (int k = 0; k <= 2 * K; ++k) {
        if (j + k <= 2 * K)
          add(tmp[min(j, k + 1)], 1LL * dp[u][j] * dp[v][k] % mod);
        else
          add(tmp[max(j, k + 1)], 1LL * dp[u][j] * dp[v][k] % mod);
      }
    }
    for (int j = 0; j <= 2 * K; ++j) dp[u][j] = tmp[j];
  }
}
int main() {
  scanf("%d%d", &n, &K);
  for (int i = 1; i < n; ++i) {
    int u, v;
    scanf("%d%d", &u, &v);
    g[u].push_back(v);
    g[v].push_back(u);
  }
  if (K == 0) return printf("1\n"), 0;
  go(1, -1);
  int ans = 0;
  for (int i = 0; i <= K; ++i) add(ans, dp[1][i]);
  printf("%d\n", ans);
  return 0;
}
