#include <bits/stdc++.h>
using namespace std;
long long n, k, x, y, d[111][33][33], cur[33][33], ans;
vector<long long> v[111];
void dfs(long long x, long long pr) {
  d[x][1][k + 1] = d[x][0][0] = 1;
  for (long long to : v[x]) {
    if (to == pr) continue;
    dfs(to, x);
    for (long long g = 0; g <= k + 1; g++)
      for (long long h = 0; h <= k + 1; h++)
        cur[g][h] = d[x][g][h], d[x][g][h] = 0;
    for (long long g = 0; g <= k + 1; g++)
      for (long long h = 0; h <= k + 1; h++)
        for (long long b = 0; b <= k + 1; b++)
          for (long long c = 0; c <= k + 1; c++)
            if (max(g, b + 1) + min(h, c + 1) <= k + 1)
              (d[x][0][min(h, c + 1)] += d[to][b][c] * cur[g][h]) %= 1000000007;
            else
              (d[x][max(g, b + 1)][min(h, c + 1)] += d[to][b][c] * cur[g][h]) %=
                  1000000007;
  }
}
int main() {
  cin >> n >> k;
  for (long long i = 1; i < n; i++)
    scanf("%lld%lld", &x, &y), v[x].push_back(y), v[y].push_back(x);
  dfs(1, 0);
  for (long long i = 0; i <= k + 1; i++) (ans += d[1][0][i]) %= 1000000007;
  cout << ans;
}
