#include <bits/stdc++.h>
using namespace std;
const long long maxn = 110;
const long long mod = 1e9 + 7;
long long n, k;
long long dp[maxn][25][25], f[maxn][25][25], h[maxn], mx_dis[maxn];
vector<long long> g[maxn];
void dfs(long long v, long long p = -1) {
  for (auto u : g[v])
    if (u != p) {
      h[u] = h[v] + 1;
      dfs(u, v);
      mx_dis[v] = max(mx_dis[v], mx_dis[u] + 1);
    }
  memset(f, 0, sizeof f);
  long long i = 0;
  for (long long x = 1; x <= k + 2; x++)
    for (long long y = 0; y <= k + 2; y++) {
      if (x < k + 2)
        f[0][x][y] = 1;
      else {
        if (y > 0)
          f[0][x][y] = 2;
        else
          f[0][x][y] = 1;
      }
    }
  for (auto u : g[v])
    if (u != p) {
      i++;
      for (long long x = 1; x <= k + 2; x++)
        for (long long y = 0; y <= k + 2; y++) {
          for (long long x1 = 1; x1 <= k + 2; x1++)
            for (long long x2 = 1; x2 <= k + 2; x2++) {
              if (x2 > x && x1 + 1 > x && x < k + 2) continue;
              long long ok_of_v = y, ok_of_u = y - 1;
              ok_of_v = max({ok_of_v, k - (x1 - 1), 0ll});
              ok_of_u = max({ok_of_u, k - (x2 - 1), 0ll});
              long long B = dp[u][x1][ok_of_u];
              if (x1 >= 2) (B -= dp[u][x1 - 1][ok_of_u]) %= mod;
              long long A = f[i - 1][x2][ok_of_v];
              if (x2 >= 2) (A -= f[i - 1][x2 - 1][ok_of_v]) %= mod;
              (f[i][x][y] += (A * B) % mod) %= mod;
            }
        }
    }
  for (long long x = 1; x <= k + 2; x++)
    for (long long y = 0; y <= k + 2; y++) {
      dp[v][x][y] = f[i][x][y];
    }
}
signed main() {
  cin >> n >> k;
  for (long long i = 1, u, v; i < n; i++) {
    cin >> u >> v;
    g[u].push_back(v);
    g[v].push_back(u);
  }
  dfs(1);
  cout << (dp[1][k + 2][0] + mod) % mod;
}
