#include <bits/stdc++.h>
using namespace std;
const int maxn = 100 + 5;
const int maxk = 20 + 5;
const long long mod = 1000000007;
vector<int> G[maxn];
long long dp[maxn][maxk * 2];
long long f[maxk * 2];
int n, k;
void dfs(int u, int fa) {
  dp[u][0] = 1;
  dp[u][k + 1] = 1;
  for (int v : G[u]) {
    if (v != fa) {
      dfs(v, u);
      for (int i = 0; i <= k * 2; i++) {
        f[i] = 0;
      }
      for (int i = 0; i <= k * 2; i++) {
        for (int j = 0; j <= k * 2; j++) {
          if (i + j <= k * 2) {
            f[min(i, j + 1)] = (f[min(i, j + 1)] + dp[u][i] * dp[v][j]) % mod;
          } else {
            f[max(i, j + 1)] = (f[max(i, j + 1)] + dp[u][i] * dp[v][j]) % mod;
          }
        }
      }
      for (int i = 0; i <= k * 2; i++) {
        dp[u][i] = f[i];
      }
    }
  }
}
int main(int argc, char const *argv[]) {
  scanf("%d%d", &n, &k);
  for (int i = 0; i < n - 1; i++) {
    int u, v;
    scanf("%d%d", &u, &v);
    G[u].push_back(v);
    G[v].push_back(u);
  }
  dfs(1, -1);
  long long ans = 0;
  for (int i = 0; i <= k; i++) {
    ans += dp[1][i] % mod;
    ans %= mod;
  }
  printf("%lld\n", ans);
  return 0;
}
