#include <bits/stdc++.h>
using namespace std;
const int N = 105, K = 25, MOD = 1e9 + 7;
int dp[2][N][K][K];
int n, k;
vector<int> adj[N];
int combine(int u, int v) {
  if (u == 22) return v;
  if (v == 22) return u;
  return max(u, v);
}
void dfs(int u, int par) {
  for (int v : adj[u])
    if (v != par) dfs(v, u);
  int cnt = 0;
  dp[0][0][0][22] = 1;
  dp[0][0][22][0] = 1;
  for (int v : adj[u])
    if (v != par) {
      cnt++;
      memset(dp[0][cnt], 0, sizeof dp[0][cnt]);
      for (int b = 0, _n = (23); b < _n; b++)
        for (int w = 0, _n = (23); w < _n; w++)
          if (dp[0][cnt - 1][b][w])
            for (int vb = 0, _n = (23); vb < _n; vb++)
              for (int vw = 0, _n = (23); vw < _n; vw++)
                if (dp[1][v][vb][vw]) {
                  int newb = min(b, vb + 1);
                  int neww = 22;
                  if (w != 22 && w + vb + 1 > k) neww = combine(neww, w);
                  if (vw != 22 && vw + 1 + b > k) neww = combine(neww, vw + 1);
                  if (neww != 22 && neww > k) continue;
                  (dp[0][cnt][newb][neww] +=
                   (1LL * dp[0][cnt - 1][b][w] * dp[1][v][vb][vw]) % MOD) %=
                      MOD;
                }
    }
  for (int b = 0, _n = (23); b < _n; b++)
    for (int w = 0, _n = (23); w < _n; w++) dp[1][u][b][w] = dp[0][cnt][b][w];
}
int main(int argc, char const *argv[]) {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  clock_t tStart = clock();
  cin >> n >> k;
  for (int nhi = 0, _n = (n - 1); nhi < _n; nhi++) {
    int u, v;
    cin >> u >> v;
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  dfs(1, -1);
  int res = 0;
  for (int b = 0, _n = (23); b < _n; b++) (res += dp[1][1][b][22]) %= MOD;
  cout << res << '\n';
  fprintf(stderr, "Time taken: %.2fs\n",
          (double)(clock() - tStart) / CLOCKS_PER_SEC);
  return 0;
}
