#include <bits/stdc++.h>
using namespace std;
const int N = 101;
const long long M = 1e9 + 7;
vector<int> adj[N];
int n, k, p[N], Q[N];
long long dp[N][31][31], dp_t[31][31];
void add(long long &a, long long b) { a = (a + b) % M; }
pair<int, int> Get(int x, int xx, int y, int yy) {
  pair<int, int> res;
  if (y + xx <= k)
    y = 0;
  else if (y)
    y++;
  if (x + yy <= k) x = 0;
  return make_pair(max(x, y), min(xx, yy + 1));
}
int main() {
  cin >> n >> k;
  for (int i = 1; i < n; i++) {
    int u, v;
    cin >> u >> v;
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  int L = 1, R = 1;
  Q[1] = 1;
  while (L <= R) {
    int u = Q[L++];
    for (auto v : adj[u]) {
      if (v == p[u]) continue;
      p[v] = u;
      Q[++R] = v;
    }
  }
  for (int i = n; i >= 1; i--) {
    int u = Q[i];
    dp[u][1][k + 1] = 1;
    dp[u][0][0] = 1;
    for (auto v : adj[u]) {
      if (v == p[u]) continue;
      for (int j1 = 0; j1 <= k + 1; j1++)
        for (int j2 = 0; j2 <= k + 1; j2++) dp_t[j1][j2] = dp[u][j1][j2];
      memset(dp[u], 0, sizeof dp[u]);
      for (int y = 0; y <= k + 1; y++)
        for (int yy = 0; yy <= k + 1; yy++)
          for (int x = 0; x <= k + 1; x++)
            for (int xx = 0; xx <= k + 1; xx++) {
              pair<int, int> cur = Get(x, xx, y, yy);
              int curx = cur.first, cury = cur.second;
              if (curx == -1) continue;
              add(dp[u][curx][cury], dp_t[x][xx] * dp[v][y][yy]);
            }
    }
  }
  long long ans = 0;
  for (int i = 0; i <= k; i++) add(ans, dp[1][0][i]);
  return cout << ans, 0;
}
