#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
const int maxn = 100 + 15;
const int mod = 1e9 + 7;
int n, k, dp[maxn][30][30][2];
vector<int> G[maxn];
inline void upd(int& x, int v) {
  if (x == -1)
    x = v;
  else
    x += v;
  if (x >= mod) x -= mod;
}
inline int mul(int x, int y) { return 1LL * x * y % mod; }
void DFS(int u, int fa) {
  memset(dp[u], -1, sizeof(dp[u]));
  dp[u][k + 1][0][0] = 1;
  dp[u][0][k + 1][1] = 1;
  for (auto v : G[u]) {
    if (v == fa) continue;
    DFS(v, u);
    int newdp[30][30][2];
    memset(newdp, -1, sizeof(newdp));
    for (int f1 = 0; f1 <= k + 1; ++f1)
      for (int f2 = 0; f2 <= k + 1; ++f2)
        for (int f3 = 0; f3 <= 1; ++f3)
          if (~dp[u][f1][f2][f3])
            for (int f4 = 0; f4 <= k + 1; ++f4)
              for (int f5 = 0; f5 <= k + 1; ++f5)
                for (int f6 = 0; f6 <= 1; ++f6)
                  if (~dp[v][f4][f5][f6]) {
                    int newj, newk, newf;
                    newf = f3 | f6;
                    if (newf == 0) {
                      newj = k + 1;
                    } else {
                      newj = 0;
                      if (f3) newj = f1;
                      if (f6) newj = max(newj, f4 + 1);
                    }
                    newk = min(f2, f5 + 1);
                    if (newf && newk + newj <= k) {
                      newf = 0, newj = k + 1;
                    }
                    upd(newdp[newj][newk][newf],
                        mul(dp[u][f1][f2][f3], dp[v][f4][f5][f6]));
                  }
    for (int i = 0; i <= k + 1; ++i)
      for (int j = 0; j <= k + 1; ++j)
        for (int f = 0; f <= 1; ++f) dp[u][i][j][f] = newdp[i][j][f];
  }
  for (int i = 0; i <= k + 1; ++i)
    for (int j = 0; j <= k + 1; ++j)
      for (int f = 0; f <= 1; ++f) {
        if (f && i >= k) {
          dp[u][i][j][f] = -1;
        }
      }
}
int main(int argc, char* argv[]) {
  n = read(), k = read();
  for (int i = 2; i <= n; ++i) {
    int u = read(), v = read();
    G[u].push_back(v);
    G[v].push_back(u);
  }
  DFS(1, 0);
  int ans = 0;
  for (int i = 0; i <= k + 1; ++i)
    for (int j = 0; j <= k + 1; ++j)
      if (~dp[1][i][j][0]) {
        upd(ans, dp[1][i][j][0]);
      }
  cout << ans << endl;
  return 0;
}
