#include <bits/stdc++.h>
using namespace std;
inline int in() {
  int x;
  scanf("%d", &x);
  return x;
}
const long double EPS = 1e-12;
const int INF = 1e9 + 10;
const long long LINF = 9000ll * 1000 * 1000 * 1000 * 1000 * 1000 + 100;
const int MN = 2e2, MK = 20 + 3;
const int MOD = 1e9 + 7;
int n, k;
vector<int> adj[MN];
int par[MN], st[MN], ft[MN], h[MN], Time;
bool seen[MK][2 * MK][MN];
int dp[MK][2 * MK][MN];
vector<int> vec[MN];
int Mx[MN];
void dfs(int s, int pr) {
  par[s] = pr;
  st[s] = Time++;
  vec[h[s]].push_back(s);
  Mx[s] = 1;
  for (int i = 0; i < ((int)(adj[s]).size()); ++i) {
    int v = adj[s][i];
    if (v == pr) continue;
    h[v] = h[s] + 1;
    dfs(v, s);
    Mx[s] = max(Mx[s], Mx[v] + 1);
  }
  ft[s] = Time;
}
void input() {
  cin >> n >> k;
  for (int i = 0; i < n - 1; ++i) {
    int a, b;
    cin >> a >> b;
    --a, --b;
    adj[a].push_back(b), adj[b].push_back(a);
  }
}
int make(int my, int yr, int v) {
  if (seen[my][yr][v]) return dp[my][yr][v];
  seen[my][yr][v] = true;
  int lm = h[v] + yr;
  int r = 0;
  if (my >= Mx[v]) r++;
  for (int i = lm; i < n; ++i)
    for (int j = 0; j < ((int)(vec[i]).size()); ++j)
      if (st[v] <= st[vec[i][j]] && st[vec[i][j]] < ft[v]) {
        int u = vec[i][j];
        if (h[u] - h[v] + 1 > k + 1 + my) continue;
        long long tmp = 1;
        for (int l = 0; l < n; ++l)
          if (st[v] <= st[l] && st[l] < ft[v]) {
            if (st[l] <= st[u] && st[u] < ft[l]) continue;
            if (st[par[l]] <= st[u] && st[u] < ft[par[l]]) {
              int my1, yr1;
              my1 = max(0, my - (h[l] - h[v])),
              yr1 = max(0, yr - (h[l] - h[v]));
              if (st[l] < st[u])
                yr1 = max(yr1, i - h[par[l]]);
              else
                yr1 = max(yr1, i - h[par[l]] - 1);
              my1 = max(my1, k - (h[u] - h[par[l]] + 1) + 1);
              tmp = (1ll * tmp * make(my1, yr1, l)) % MOD;
            }
          }
        r += tmp;
        if (r >= MOD) r -= MOD;
      }
  return dp[my][yr][v] = r;
}
int main() {
  ios_base ::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  input();
  dfs(0, -1);
  cout << make(0, 0, 0) << '\n';
  return 0;
}
