#include <bits/stdc++.h>
using namespace std;
#pragma comment(linker, "/STACK:102400000,102400000")
const int MOD = 1e9 + 7;
const int N = 107;
vector<int> g[N];
int n, k;
long long f[N][47];
long long tmp[47];
void dfs(int u, int fa) {
  f[u][0] = f[u][k + 1] = 1;
  for (auto v : g[u])
    if (v != fa) {
      dfs(v, u);
      memset(tmp, 0, sizeof(tmp));
      for (int i = int(0); i <= int(2 * k + 1); ++i)
        for (int j = int(0); j <= int(2 * k); ++j) {
          if (i + j <= 2 * k) {
            (tmp[min(i, j + 1)] += f[u][i] * f[v][j] % MOD) %= MOD;
          } else {
            (tmp[max(i, j + 1)] += f[u][i] * f[v][j] % MOD) %= MOD;
          }
        }
      memcpy(f[u], tmp, sizeof(tmp));
    }
}
int main() {
  scanf("%d%d", &n, &k);
  for (int i = int(1); i <= int(n - 1); ++i) {
    int a, b;
    scanf("%d%d", &a, &b);
    g[a].push_back(b);
    g[b].push_back(a);
  }
  dfs(1, 0);
  long long ans = 0;
  for (int i = int(0); i <= int(k); ++i) ans = (ans + f[1][i]) % MOD;
  cout << ans << endl;
  return 0;
}
