#include <bits/stdc++.h>
using namespace std;
const int MOD = (int)1e9 + 7;
void add(int &a, int b) {
  a += b;
  if (a >= MOD) a -= MOD;
}
int dp[128][25][25];
int tdp[25][25];
vector<int> adj[128];
int n, k;
int &g(int a[25][25], int w, int b) { return a[w + 1][b]; }
void f(int u, int p) {
  g(dp[u], -1, 0) = 1;
  g(dp[u], 0, 21) = 1;
  for (int v : adj[u]) {
    if (v == p) continue;
    f(v, u);
    memset(tdp, 0, sizeof tdp);
    for (int ow = -1; ow <= 21; ow++) {
      for (int ob = 0; ob <= 21; ob++) {
        for (int nw = -1; nw <= 21; nw++) {
          for (int nb = -1; nb <= 21; nb++) {
            int w1 = ow, w2 = nw;
            if (ow == -1 || (ow + nb + 1) <= k) w1 = -1;
            if (nw == -1 || (nw + ob + 1) <= k) w2 = -1;
            int cw = w1;
            if (w2 != -1) cw = max(cw, w2 + 1);
            int cb = ob;
            if (nb != 21) cb = min(cb, nb + 1);
            add(g(tdp, cw, cb),
                (long long)g(dp[u], ow, ob) * g(dp[v], nw, nb) % MOD);
          }
        }
      }
    }
    memcpy(dp[u], tdp, sizeof tdp);
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> n >> k;
  for (int i = 0; i < n - 1; i++) {
    int u, v;
    cin >> u >> v;
    u--;
    v--;
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  f(0, -1);
  int res = 0;
  for (int b = 0; b <= 21; b++) {
    add(res, g(dp[0], -1, b));
  }
  cout << res << endl;
}
