#include <bits/stdc++.h>
const int mod = 1000000007;
using namespace std;
int n, k, cnt = 0, head[103];
struct node {
  int nxt, to;
} edge[205];
long long int dp[105][255], f[255];
void add(int a, int b) {
  edge[++cnt].to = b, edge[cnt].nxt = head[a];
  head[a] = cnt;
}
void Init() {
  scanf("%d%d", &n, &k);
  int a, b;
  memset(head, -1, sizeof(head));
  for (int i = 1; i < n; ++i) {
    scanf("%d%d", &a, &b);
    add(a, b);
    add(b, a);
  }
}
void dfs(int u, int pre) {
  dp[u][0] = dp[u][k + 1] = 1;
  for (int i = head[u]; ~i; i = edge[i].nxt) {
    int v = edge[i].to;
    if (v == pre) continue;
    dfs(v, u);
    memset(f, 0, sizeof(f));
    for (int x = 0; x <= 2 * k + 1; ++x) {
      for (int y = 0; y <= 2 * k; ++y) {
        if (x + y <= 2 * k)
          f[min(x, y + 1)] =
              (f[min(x, y + 1)] + (dp[u][x] * dp[v][y] % mod)) % mod;
        else
          f[max(x, y + 1)] =
              (f[max(x, y + 1)] + (dp[u][x] * dp[v][y] % mod)) % mod;
      }
    }
    memcpy(dp[u], f, sizeof f);
  }
}
void Solve() {
  dfs(1, -1);
  long long int ans = 0ll;
  for (int i = 0; i <= k; ++i) ans = (ans + dp[1][i]) % mod;
  cout << ans << endl;
}
int main() {
  Init();
  Solve();
  fclose(stdin);
  fclose(stdout);
  return 0;
}
