#include <bits/stdc++.h>
const double Pi = acos(-1.0);
using namespace std;
const long long mod = 1000000007;
int n, k;
vector<int> G[105];
long long dp[105][45];
void dfs(int cur, int pre) {
  dp[cur][0] = dp[cur][k + 1] = 1;
  for (int i = 0; i < (int)G[cur].size(); i++) {
    int nxt = G[cur][i];
    if (nxt == pre) continue;
    dfs(nxt, cur);
    long long tmp[45] = {0};
    for (int l = 0; l <= 2 * k; l++) {
      for (int r = 0; r <= 2 * k; r++) {
        if (l + r <= 2 * k)
          tmp[min(l, r + 1)] =
              (tmp[min(l, r + 1)] + (dp[cur][l] * dp[nxt][r]) % mod) % mod;
        else
          tmp[max(l, r + 1)] =
              (tmp[max(l, r + 1)] + (dp[cur][l] * dp[nxt][r]) % mod) % mod;
      }
    }
    for (int j = 0; j <= 2 * k; j++) dp[cur][j] = tmp[j];
  }
}
int main(int argc, char** argv) {
  scanf("%d %d", &n, &k);
  int u, v;
  for (int i = 1; i < n; i++) {
    scanf("%d %d", &u, &v);
    G[u].push_back(v);
    G[v].push_back(u);
  }
  dfs(1, 0);
  long long ans = 0;
  for (int i = 0; i <= k; i++) ans = (ans + dp[1][i]) % mod;
  printf("%lld\n", ans);
  return 0;
}
