#include <bits/stdc++.h>
using namespace std;
vector<vector<int>> g;
const int maxn = 105, maxm = 21;
long long f[maxn][maxm][maxm];
long long c[maxm][maxm];
long long q = 1000000007;
int n, m;
void combine(int x, int y) {
  memset(c, 0, sizeof(c));
  for (int i = 0; i <= m; i++) {
    for (int j = 0; j <= m; j++) {
      if (!f[x][i][j]) continue;
      for (int k = 0; k <= m; k++) {
        for (int l = 0; l <= m; l++) {
          if (!f[y][k][l]) continue;
          int u, v = 0;
          if (i + l > m) v = max(v, l + 1);
          if (j + k > m) v = max(v, j);
          if (v > m) continue;
          u = min(i, k + 1);
          c[u][v] = (c[u][v] + f[x][i][j] * f[y][k][l]) % q;
        }
      }
    }
  }
  for (int i = 0; i <= m; i++) {
    for (int j = 0; j <= m; j++) {
      f[x][i][j] = c[i][j];
    }
  }
}
void dfs(int x, int fa) {
  int s = g[x].size();
  f[x][0][0] = 1;
  f[x][m][1] = 1;
  if (s == 0) return;
  for (int i = 0; i < s; i++) {
    int v = g[x][i];
    if (v == fa) continue;
    dfs(v, x);
    combine(x, v);
  }
}
void init() {
  cin >> n >> m;
  int i, x, y;
  g = vector<vector<int>>(n + 1);
  for (i = 0; i < n - 1; i++) {
    cin >> x >> y;
    g[x].push_back(y);
    g[y].push_back(x);
  }
}
void solve(int x) {
  long long ans = 0;
  for (int i = 0; i <= m; i++) ans = (ans + f[x][i][0]) % q;
  cout << ans << endl;
}
int main(void) {
  init();
  dfs(1, 0);
  solve(1);
  return 0;
}
