#include <bits/stdc++.h>
using namespace std;
const int P = 1e9 + 7;
int n, k;
int A[206];
vector<int> G[206];
int dp[206][23][23], t[23][23];
void dfs(int u, int f) {
  dp[u][0][k] = dp[u][k][0] = 1;
  for (int v : G[u])
    if (v != f) {
      dfs(v, u);
      memset(t, 0, sizeof t);
      for (int a = (0), aend = (k); a <= aend; ++a)
        for (int b = (0), bend = (k); b <= bend; ++b)
          if (dp[u][a][b]) {
            for (int p = (0), pend = (k); p <= pend; ++p)
              for (int q = (0), qend = (k); q <= qend; ++q)
                if (dp[v][p][q]) {
                  int tj = -1;
                  if (b < k && p + b + 1 > k) tj = max(tj, b);
                  if (q < k && a + q + 1 > k) tj = max(tj, q + 1);
                  if (tj == -1)
                    tj = k;
                  else if (tj == k)
                    tj = -1;
                  if (~tj)
                    (t[min({a, p + 1, k})][tj] +=
                     dp[u][a][b] * 1ll * dp[v][p][q] % P) %= P;
                }
          }
      memcpy(dp[u], t, sizeof t);
    }
}
void solve() {
  cin >> n >> k;
  for (int i = (2), iend = (n); i <= iend; ++i) {
    int u, v;
    scanf("%d%d", &u, &v);
    G[u].push_back(v), G[v].push_back(u);
  }
  dfs(1, 1);
  int as = 0;
  for (int i = (0), iend = (k); i <= iend; ++i) as = (as + dp[1][i][k]) % P;
  cout << as << endl;
}
signed main() { solve(); }
