#include <bits/stdc++.h>
using namespace std;
const int INF = 1000000000;
const int MAX = 2000;
const int MAXC = 10000;
const int MAXV = 20 * 20;
const int BASE = 1000000007;
const int MOD = 1000000007;
int n, k;
long long res[101][22][22];
long long cur[2][22][22][2];
vector<int> g[111];
int a, b;
void dfs(int v, int p = -1) {
  for (int i = (0); i < (g[v].size()); i++) {
    if (g[v][i] != p) dfs(g[v][i], v);
  }
  res[v][1][0] = 1;
  for (int i = (0); i < (g[v].size()); i++) {
    if (g[v][i] != p) {
      long long D = 0;
      for (int t = (0); t < (k + 2); t++)
        for (int f = (0); f < (k + 1); f++) D = (D + res[g[v][i]][t][f]) % MOD;
      res[v][1][0] = (res[v][1][0] * D) % MOD;
    }
  }
  memset(cur, 0, sizeof(cur));
  int c = 0, t = 1;
  cur[c][k + 1][0][1] = 1;
  for (int i = (0); i < (g[v].size()); i++) {
    if (g[v][i] != p) {
      for (int t1 = (0); t1 < (k + 2); t1++)
        for (int t2 = (0); t2 < (k + 1); t2++)
          for (int p2 = (0); p2 < (2); p2++)
            if (cur[c][t1][t2][p2])
              for (int n1 = (0); n1 < (k + 2); n1++)
                for (int n2 = (0); n2 < (k + 1); n2++)
                  if (res[g[v][i]][n1][n2]) {
                    int U1 = min(n1, t1), U2 = max(t2, n2), P = p2;
                    if (U1 <= k) P = 0;
                    if (U1 + U2 <= k) U2 = 0;
                    cur[t][U1][U2][P] =
                        (cur[t][U1][U2][P] +
                         cur[c][t1][t2][p2] * res[g[v][i]][n1][n2]) %
                        MOD;
                  }
      memset(cur[c], 0, sizeof(cur[c]));
      swap(c, t);
    }
  }
  for (int i = (0); i < (k + 2); i++)
    for (int j = (0); j < (k + 1); j++) {
      if (j)
        res[v][min(k, i) + 1][j + 1] =
            (res[v][min(k, i) + 1][j + 1] + cur[c][i][j][0]) % MOD;
      else
        res[v][min(k, i) + 1][0] =
            (res[v][min(k, i) + 1][0] + cur[c][i][0][0]) % MOD;
      res[v][min(k, i) + 1][max(j + 1, 1)] =
          (res[v][min(k, i) + 1][max(j + 1, 1)] + cur[c][i][j][1]) % MOD;
    }
}
int main() {
  cin >> n >> k;
  if (k == 0) {
    cout << 1;
    return 0;
  }
  for (int i = (0); i < (n - 1); i++) {
    cin >> a >> b;
    a--;
    b--;
    g[a].push_back(b);
    g[b].push_back(a);
  }
  dfs(0);
  long long RES = 0;
  for (int i = (0); i < (k + 2); i++) {
    RES += res[0][i][0];
  }
  RES %= MOD;
  cout << RES;
  return 0;
}
