#include <bits/stdc++.h>
using namespace std;
const int MOD = int(1e9) + 7;
int n, k;
vector<int> g[100];
int d[100][25], f[100][25];
int nd[25], nf[25];
void add(int &x, long long y) { x = (x + y) % MOD; }
void dfs(int v, int par) {
  memset(d[v], 0, sizeof d[v]);
  memset(f[v], 0, sizeof f[v]);
  d[v][0] = 1;
  f[v][0] = 1;
  for (int to : g[v])
    if (to != par) {
      dfs(to, v);
      memset(nd, 0, sizeof nd);
      memset(nf, 0, sizeof nf);
      for (int i = 0; i < (int)(k + 1); ++i)
        for (int j = 0; j < (int)(k + 1); ++j) {
          if (j < k) {
            add(nd[max(i, j + 1)], (long long)d[v][i] * d[to][j]);
          }
          if (i + 1 + j <= k) {
            add(nf[j + 1], (long long)d[v][i] * f[to][j]);
          } else {
            add(nd[i], (long long)d[v][i] * f[to][j]);
          }
          if (i + 1 + j <= k) {
            add(nf[i], (long long)f[v][i] * d[to][j]);
          } else if (j < k) {
            add(nd[j + 1], (long long)f[v][i] * d[to][j]);
          }
          add(nf[min(i, j + 1)], (long long)f[v][i] * f[to][j]);
        }
      memcpy(d[v], nd, sizeof nd);
      memcpy(f[v], nf, sizeof nf);
    }
}
int main() {
  scanf("%d%d", &n, &k);
  for (int i = 0; i < (int)(n - 1); ++i) {
    int from, to;
    scanf("%d%d", &from, &to);
    --from, --to;
    g[from].push_back(to);
    g[to].push_back(from);
  }
  dfs(0, -1);
  int ans = 0;
  for (int i = 0; i < (int)(k + 1); ++i) {
    add(ans, f[0][i]);
  }
  cout << ans << endl;
  return 0;
}
