#include <bits/stdc++.h>
using namespace std;
const int MAXN = 105;
const int MAXK = 25;
const long long MOD = 1000000007;
long long dp[MAXN][MAXK][MAXK];
int n, k;
vector<vector<int> > g;
int none;
void calc(int v, int p) {
  dp[v][none][0] = dp[v][0][none] = 1;
  for (int u : g[v]) {
    if (u == p) continue;
    calc(u, v);
    long long next[MAXK][MAXK];
    memset(next, 0, sizeof(next));
    for (int l1 = 0; l1 < (int)(k + 2); l1++) {
      for (int l2 = 0; l2 < (int)(k + 2); l2++) {
        if (!dp[v][l1][l2]) continue;
        for (int t1 = 0; t1 < (int)(k + 2); t1++) {
          for (int t2 = 0; t2 < (int)(k + 2); t2++) {
            if (!dp[u][t1][t2]) continue;
            int q2 = -1;
            if (l2 != none && l2 + 1 + t1 > k) {
              q2 = l2;
            }
            if (t2 != none && t2 + 1 + l1 > k) {
              q2 = max(q2, t2 + 1);
            }
            int q1 = -1;
            if (l1 != none) {
              q1 = l1;
            }
            if (t1 != none) {
              if (q1 == -1)
                q1 = t1 + 1;
              else
                q1 = min(q1, t1 + 1);
            }
            if (q1 > k) {
              q1 = -1;
              q2 = max(q2, 0);
            }
            if (q2 > k) {
              continue;
            }
            if (q2 == -1) q2 = none;
            if (q1 == -1) q1 = none;
            next[q1][q2] = (next[q1][q2] + dp[v][l1][l2] * dp[u][t1][t2]) % MOD;
          }
        }
      }
    }
    memcpy(dp[v], next, sizeof(next));
  }
}
int main() {
  cin >> n >> k;
  g = vector<vector<int> >(n);
  for (int i = 0; i < (int)(n - 1); i++) {
    int x, y;
    cin >> x >> y;
    x--, y--;
    g[x].push_back(y);
    g[y].push_back(x);
  }
  none = k + 1;
  calc(0, -1);
  long long ans = 0;
  for (int i = 0; i < (int)(k + 2); i++) {
    ans = (ans + dp[0][i][none]) % MOD;
  }
  cout << ans << endl;
  return 0;
}
