#include <bits/stdc++.h>
using namespace std;
const long long maxn = 1e2 + 10;
const long long maxk = 1e2 + 10;
const long long mod = 1e9 + 7;
long long ans;
long long n, k;
bool mark[maxn];
long long hehe[maxn];
long long nopick[maxn];
long long dp[maxn][maxk][maxk];
long long inner[maxn][maxn][maxk];
vector<long long> adj[maxn], kids[maxn];
void in();
void solve();
int dfs(long long u, long long h = 0);
void out();
int main() {
  ios::sync_with_stdio(false);
  cout.tie(0);
  cin.tie(0);
  in();
  solve();
  out();
}
void in() {
  cin >> n >> k;
  for (long long i = 1; i < n; i++) {
    long long u, v;
    cin >> u >> v;
    u--;
    v--;
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
}
void solve() {
  dfs(0);
  for (long long i = 0; i <= k; i++) ans = (ans + dp[0][k + 1][i]) % mod;
}
int dfs(long long u, long long h) {
  mark[u] = 1;
  int H = h;
  for (auto v : adj[u]) {
    if (!mark[v]) {
      kids[u].push_back(v);
      H = max(H, dfs(v, h + 1));
    }
  }
  for (long long i = 1; i <= k + 1; i++) {
    for (int i = 0; i < maxn; i++) nopick[i] = 1;
    for (long long x = 0; x < kids[u].size(); x++) {
      for (long long y = 2 * k + 1; y > 0; y--) {
        inner[i][x + 1][y] = 0;
        for (long long z = y + 1; z <= 2 * k + 1; z++) {
          if (y <= hehe[kids[u][x]] - h)
            inner[i][x + 1][y] += inner[i][x][z] *
                                  dp[kids[u][x]][min(k, min(i, z)) + 1][y - 1] %
                                  mod;
          inner[i][x + 1][y] %= mod;
        }
        for (long long z = y; z <= 2 * k + 1; z++) {
          if (z <= hehe[kids[u][x]] - h)
            inner[i][x + 1][y] += inner[i][x][y] *
                                  dp[kids[u][x]][min(k, min(i, y)) + 1][z - 1] %
                                  mod;
          inner[i][x + 1][y] %= mod;
        }
        if (y <= hehe[kids[u][x]] - h)
          inner[i][x + 1][y] +=
              nopick[y] * dp[kids[u][x]][min(k, i) + 1][y - 1] % mod;
        inner[i][x + 1][y] %= mod;
        if (hehe[kids[u][x]] - h + i > k)
          nopick[y] = 0;
        else
          inner[i][x + 1][y] += inner[i][x][y];
        inner[i][x + 1][y] %= mod;
        if (y < i) inner[i][x + 1][y] = inner[y][x + 1][y];
      }
    }
    for (long long J = i; J <= 2 * k + 1; J++) {
      long long j = J - i;
      dp[u][i][j] = inner[i][kids[u].size()][j];
      if (j > H - h && H - h + i <= k) dp[u][i][j] = 1;
    }
    dp[u][i][0] = 1;
    for (int j = 0; j < kids[u].size(); j++) {
      int zarib = 0;
      for (int x = 0; x <= 2 * k + 1; x++) {
        if (x <= hehe[kids[u][j]] - h) {
          zarib += dp[kids[u][j]][1][x];
          zarib %= mod;
        }
      }
      dp[u][i][0] = dp[u][i][0] * zarib % mod;
    }
    for (long long J = i; J <= 2 * k + 1; J++) long long j = J - i;
  }
  hehe[u] = H;
  return H;
}
void out() { cout << ans; }
