#include <bits/stdc++.h>
using namespace std;
const int N = 105, K = 23, mod = 1e9 + 7;
int n, t, u, v, k, ans, C[K][K], dp[N][K][K];
vector<int> g[N];
void dfs(int x, int par) {
  dp[x][0][0] = 1;
  for (int i = 0; i < g[x].size(); i++)
    if (g[x][i] != par) {
      dfs(g[x][i], x);
      for (int i = 0; i < k + 1; i++)
        for (int j = 0; j < k + 1; j++) C[i][j] = 0;
      for (int a1 = 0; a1 < k + 1; a1++)
        for (int a2 = 0; a2 < k + 1; a2++)
          for (int b1 = 0; b1 < k + 1; b1++)
            for (int b2 = 0; b2 < k + 1; b2++)
              C[max(a1, b1)][max(a2, b2)] =
                  (C[max(a1, b1)][max(a2, b2)] +
                   1ll * dp[x][a1][a2] * dp[g[x][i]][b1][b2] % mod) %
                  mod;
      for (int a1 = 0; a1 < k + 1; a1++)
        for (int a2 = 0; a2 < k + 1; a2++) dp[x][a1][a2] = C[a1][a2];
    }
  for (int s = 0; s < k + 1; s++)
    for (int j = 0; j < k + 1; j++) C[s][j] = dp[x][s][j], dp[x][s][j] = 0;
  for (int s = 0; s < k + 1; s++)
    for (int j = 0; j < k + 1; j++) {
      if (s - 1 >= j || j == 0) {
        if (s)
          dp[x][s - 1][0] = (dp[x][s - 1][0] + C[s][j]) % mod;
        else
          dp[x][0][1] = (dp[x][0][1] + C[s][j]) % mod;
      } else
        dp[x][max(s - 1, 0)][j + 1] =
            (dp[x][max(s - 1, 0)][j + 1] + C[s][j]) % mod;
    }
  for (int i = 0; i < k; i++)
    for (int j = 0; j < k + 2; j++)
      dp[x][k][0] = (dp[x][k][0] + dp[x][i][j]) % mod;
}
int main() {
  cin >> n >> k;
  if (k == 0) return cout << 1, 0;
  for (int i = 1; i < n; i++) {
    scanf("%d%d", &u, &v);
    ;
    g[u].push_back(v);
    g[v].push_back(u);
  }
  dfs(1, 0);
  for (int i = 0; i < k + 1; i++) ans = (ans + dp[1][i][0]) % mod;
  cout << ans;
}
