#include <bits/stdc++.h>
using namespace std;
const int MO = 1e9 + 7;
int n, K;
long long dp[105][44], tt[44];
vector<int> e[105];
void add(long long &x, long long y) { x = (x + y) % MO; }
void mul(long long &x, long long y) { x = x * y % MO; }
void dfs(int u, int f) {
  dp[u][K + 1] = 1;
  dp[u][0] = 1;
  for (auto v : e[u])
    if (v != f) {
      dfs(v, u);
      for (int i = 0; i <= 2 * K; ++i)
        for (int j = 0; j <= 2 * K; ++j)
          add(tt[i + j <= 2 * K ? min(i, j + 1) : max(i, j + 1)],
              dp[u][i] * dp[v][j]);
      memcpy(dp[u], tt, sizeof tt);
      memset(tt, 0, sizeof tt);
    }
}
int main() {
  cin >> n >> K;
  for (int i = 1, x, y; i < n; ++i) {
    cin >> x >> y;
    e[x].push_back(y);
    e[y].push_back(x);
  }
  dfs(1, 0);
  long long ans = 0;
  for (int i = 0; i <= K; ++i) add(ans, dp[1][i]);
  cout << ans << endl;
}
