#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
int n, k, dp[110][110], f[110], ans;
vector<int> V[110];
void dfs(int x, int pa) {
  dp[x][0] = 1;
  dp[x][k + 1] = 1;
  for (int i = 0; i < V[x].size(); i++) {
    int y = V[x][i];
    if (y == pa) continue;
    dfs(y, x);
    for (int i = 0; i <= 2 * k; i++) f[i] = 0;
    for (int i = 0; i <= 2 * k; i++) {
      for (int j = 0; j <= 2 * k; j++) {
        if (i + j <= 2 * k)
          f[min(i, j + 1)] =
              (1ll * dp[x][i] * dp[y][j] + f[min(i, j + 1)]) % mod;
        else
          f[max(i, j + 1)] =
              (1ll * dp[x][i] * dp[y][j] + f[max(i, j + 1)]) % mod;
      }
    }
    for (int i = 0; i <= 2 * k; i++) dp[x][i] = f[i];
  }
}
int main() {
  scanf("%d%d", &n, &k);
  int x, y;
  for (int i = 1; i < n; i++) {
    scanf("%d%d", &x, &y);
    V[x].push_back(y);
    V[y].push_back(x);
  }
  dfs(1, 0);
  for (int i = 0; i <= k; i++) ans = (ans + dp[1][i]) % mod;
  printf("%d\n", ans);
}
