#include <bits/stdc++.h>
using namespace std;
const long long MAXN = 1e2 + 10;
const long long MAXK = 22;
const long long Mod = 1e9 + 7;
vector<long long> vertex[MAXN];
long long dp[MAXN][MAXK][MAXK];
long long tmp[MAXK][MAXK];
bool check[MAXN];
long long k;
void dfs(long long v) {
  check[v] = true;
  dp[v][k + 1][1] = 1;
  dp[v][0][0] = 1;
  for (long long i = 0; i < vertex[v].size(); i++) {
    if (!check[vertex[v][i]]) {
      dfs(vertex[v][i]);
      for (long long j = 0; j <= k + 1; j++) {
        for (long long u = 0; u <= k + 1; u++) {
          tmp[j][u] = 0;
        }
      }
      for (long long j = 0; j <= k + 1; j++) {
        for (long long u = 0; u <= k + 1; u++) {
          for (long long w = 0; w <= k + 1; w++) {
            for (long long z = 0; z <= k; z++) {
              if (min(j, w + 1) + max(u, z + 1) - 1 > k) {
                tmp[min(j, w + 1)][max(u, z + 1)] +=
                    dp[v][j][u] * dp[vertex[v][i]][w][z];
                tmp[min(j, w + 1)][max(u, z + 1)] %= Mod;
              } else {
                tmp[min(j, w + 1)][0] += dp[v][j][u] * dp[vertex[v][i]][w][z];
                tmp[min(j, w + 1)][0] %= Mod;
              }
            }
          }
        }
      }
      for (long long j = 0; j <= k + 1; j++) {
        for (long long u = 0; u <= k + 1; u++) {
          dp[v][j][u] = tmp[j][u];
        }
      }
    }
  }
}
int main() {
  ios_base ::sync_with_stdio(false);
  cin.tie(0);
  long long n, ans = 0;
  cin >> n >> k;
  for (long long i = 0; i < (n - 1); i++) {
    long long v, u;
    cin >> v >> u;
    vertex[v].push_back(u);
    vertex[u].push_back(v);
  }
  dfs(1);
  for (long long i = 0; i <= k; i++) {
    ans += dp[1][i][0];
    ans %= Mod;
  }
  cout << ans;
}
