#include <bits/stdc++.h>
using namespace std;
const int Maxn = 105;
const int Maxm = 23;
const int mo = 1000000007;
int f[Maxn][Maxm][Maxm];
int g[Maxn][Maxm][Maxm];
vector<vector<int> > e;
vector<vector<int> > sons;
bool visit[Maxn];
int N, K;
void dp(int x) {
  visit[x] = true;
  for (int i = 0; i < e[x].size(); ++i)
    if (!visit[e[x][i]]) {
      sons[x].push_back(e[x][i]);
      dp(e[x][i]);
    }
  for (int i = 0; i < sons[x].size() + 1; ++i)
    for (int j = 0; j <= K; ++j)
      for (int k = 0; k <= K + 1; ++k) g[i][j][k] = 0;
  g[0][0][K + 1] = 1;
  for (int i = 0; i < sons[x].size(); ++i) {
    int nex = sons[x][i];
    for (int j = 0; j <= K; ++j)
      for (int k = 1; k <= K + 1; ++k)
        if (g[i][j][k] > 0) {
          for (int jj = 0; jj <= K; ++jj)
            for (int kk = 1; kk <= K + 1; ++kk)
              if (f[nex][jj][kk] > 0) {
                int t1, t2;
                if (j == 0)
                  t1 = 0;
                else if (j + kk <= K)
                  t1 = 0;
                else
                  t1 = j;
                if (jj == 0)
                  t2 = 0;
                else if (jj + k <= K)
                  t2 = 0;
                else
                  t2 = jj;
                g[i + 1][max(t1, t2)][min(k, kk)] +=
                    (long long)g[i][j][k] * f[nex][jj][kk] % mo;
                if (g[i + 1][max(t1, t2)][min(k, kk)] >= mo)
                  g[i + 1][max(t1, t2)][min(k, kk)] -= mo;
              }
        }
  }
  if (sons[x].size() == 0) {
    f[x][0][1] = 1;
    f[x][1][K + 1] = 1;
  } else {
    for (int j = 0; j <= K; ++j)
      for (int k = 1; k <= K + 1; ++k) {
        if (j < K) {
          if (j > 0) {
            f[x][j + 1][min(k + 1, K + 1)] += g[sons[x].size()][j][k];
            if (f[x][j + 1][min(k + 1, K + 1)] >= mo)
              f[x][j + 1][min(k + 1, K + 1)] -= mo;
          } else {
            if (k < K + 1) {
              f[x][0][k + 1] += g[sons[x].size()][j][k];
              if (f[x][0][k + 1] >= mo) f[x][0][k + 1] -= mo;
            } else {
              f[x][1][K + 1] += g[sons[x].size()][j][k];
              if (f[x][1][K + 1] >= mo) f[x][1][K + 1] -= mo;
            }
          }
        }
        f[x][0][1] += g[sons[x].size()][j][k];
        if (f[x][0][1] >= mo) f[x][0][1] -= mo;
      }
  }
}
int main() {
  scanf("%d %d", &N, &K);
  e.resize(N + 1, vector<int>());
  sons.resize(N + 1, vector<int>());
  for (int i = 1; i <= N; ++i) {
    e[i].clear();
    sons[i].clear();
  }
  for (int i = 0; i < N - 1; ++i) {
    int x, y;
    scanf("%d %d", &x, &y);
    e[x].push_back(y);
    e[y].push_back(x);
  }
  memset(f, 0, sizeof(f));
  memset(visit, false, sizeof(visit));
  dp(1);
  int res = 0;
  for (int k = 0; k <= K + 1; ++k) res = (res + f[1][0][k]) % mo;
  printf("%d\n", res);
  return 0;
}
