#include <bits/stdc++.h>
using namespace std;
const int NMAX = 105;
const int KMAX = 25;
const int MOD = 1000000007;
int N, K;
vector<int> G[NMAX], children[NMAX];
bool mark[NMAX];
int DP[NMAX][KMAX][KMAX], auxDP[NMAX][KMAX][KMAX];
void read() {
  scanf("%d%d", &N, &K);
  int x, y;
  for (int i = 1; i < N; i++) {
    scanf("%d%d", &x, &y);
    G[x].push_back(y);
    G[y].push_back(x);
  }
}
inline void mod(int& x) {
  while (x >= MOD) {
    x -= MOD;
  }
}
void dfs(int node) {
  mark[node] = true;
  for (auto& x : G[node]) {
    if (!mark[x]) {
      children[node].push_back(x);
      dfs(x);
    }
  }
  for (size_t i = 0; i < children[node].size(); i++) {
    memset(auxDP[i], 0, sizeof(auxDP[i]));
  }
  if (children[node].empty()) {
    DP[node][K + 1][1] = 1;
    DP[node][0][0] = 1;
    return;
  }
  for (int closest = 0; closest <= K + 1; closest++) {
    for (int furthestUnsolved = 0; furthestUnsolved <= K + 1;
         furthestUnsolved++) {
      auxDP[0][closest][furthestUnsolved] =
          DP[children[node][0]][closest][furthestUnsolved];
    }
  }
  for (size_t idx = 1; idx < children[node].size(); idx++) {
    for (int currClosest = 0; currClosest <= K + 1; currClosest++) {
      for (int currFurthestUnsolved = 0; currFurthestUnsolved <= K + 1;
           currFurthestUnsolved++) {
        for (int closest = 0; closest <= K + 1; closest++) {
          for (int furthestUnsolved = 0; furthestUnsolved <= K + 1;
               furthestUnsolved++) {
            int newClosest = min(currClosest, closest);
            int newFurthestUnsolved =
                max(currFurthestUnsolved, furthestUnsolved);
            auxDP[idx][newClosest][newFurthestUnsolved] +=
                (1LL * auxDP[idx - 1][currClosest][currFurthestUnsolved] *
                 DP[children[node][idx]][closest][furthestUnsolved]) %
                MOD;
            mod(auxDP[idx][newClosest][newFurthestUnsolved]);
          }
        }
      }
    }
  }
  int noChildren = (int)children[node].size();
  for (int closest = 0; closest <= K + 1; closest++) {
    for (int furthestUnsolved = 0; furthestUnsolved <= K + 1;
         furthestUnsolved++) {
      int newClosest = min(closest + 1, K + 1);
      if (furthestUnsolved + 1 + closest <= K) {
        DP[node][newClosest][0] +=
            auxDP[noChildren - 1][closest][furthestUnsolved];
        mod(DP[node][newClosest][0]);
      } else {
        if (furthestUnsolved <= K) {
          DP[node][newClosest][furthestUnsolved + 1] +=
              auxDP[noChildren - 1][closest][furthestUnsolved];
          mod(DP[node][newClosest][furthestUnsolved + 1]);
        }
      }
      if (furthestUnsolved <= K) {
        DP[node][0][0] += auxDP[noChildren - 1][closest][furthestUnsolved];
        mod(DP[node][0][0]);
      }
    }
  }
}
void solve() {
  dfs(1);
  int res = 0;
  for (int closest = 0; closest <= K; closest++) {
    res += DP[1][closest][0];
    mod(res);
  }
  printf("%d\n", res);
}
int main() {
  read();
  solve();
  return 0;
}
