#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline void ckmax(T& x, T y) {
  x = (y > x ? y : x);
}
template <typename T>
inline void ckmin(T& x, T y) {
  x = (y < x ? y : x);
}
const int MAXN = 100, MAXK = 20;
const int MOD = 1e9 + 7;
inline int mod1(int x) { return x < MOD ? x : x - MOD; }
inline int mod2(int x) { return x < 0 ? x + MOD : x; }
inline void add(int& x, int y) { x = mod1(x + y); }
inline void sub(int& x, int y) { x = mod2(x - y); }
inline int pow_mod(int x, int i) {
  int y = 1;
  while (i) {
    if (i & 1) y = (long long)y * x % MOD;
    x = (long long)x * x % MOD;
    i >>= 1;
  }
  return y;
}
int n, lim;
struct EDGE {
  int nxt, to;
} edge[MAXN * 2 + 5];
int head[MAXN + 5], tot;
inline void add_edge(int u, int v) {
  edge[++tot].nxt = head[u], edge[tot].to = v, head[u] = tot;
}
int dp[MAXN + 5][MAXK + 5][MAXK + 5][2], tmp[MAXK + 5][MAXK + 5][2];
void dfs(int u, int fa) {
  for (int j = 0; j <= lim + 1; ++j) {
    for (int k = 1; k <= lim + 1; ++k) {
      if (j > lim && k > lim) continue;
      if (k <= lim)
        dp[u][j][k][0] = 1;
      else
        dp[u][j][k][1] = 1;
    }
  }
  for (int i = head[u]; i; i = edge[i].nxt) {
    int v = edge[i].to;
    if (v == fa) continue;
    dfs(v, u);
    for (int j = 0; j <= lim + 1; ++j) {
      for (int k = 0; k <= lim + 1; ++k) {
        tmp[j][k][0] = tmp[j][k][1] = 0;
      }
    }
    for (int j = 0; j <= lim + 1; ++j) {
      for (int k = 1; k <= lim + 1; ++k) {
        if (j > lim && k > lim) continue;
        for (int l = max(1, k - 1); l <= lim + 1; ++l) {
          if (k < j) {
            add(tmp[j][k][l + 1 == k],
                (long long)dp[u][j][k][0] * dp[v][k + 1][l][1] % MOD);
            add(tmp[j][k][1],
                (long long)dp[u][j][k][1] * dp[v][k + 1][l][1] % MOD);
          } else {
            add(tmp[j][k][l + 1 == k], (long long)dp[u][j][k][0] *
                                           dp[v][min(j + 1, lim + 1)][l][1] %
                                           MOD);
            add(tmp[j][k][1], (long long)dp[u][j][k][1] *
                                  dp[v][min(j + 1, lim + 1)][l][1] % MOD);
          }
          if (k == 1) {
            add(tmp[j][1][1], (long long)dp[u][j][1][0] * dp[v][0][l][1] % MOD);
            add(tmp[j][1][1], (long long)dp[u][j][1][1] * dp[v][0][l][1] % MOD);
          }
        }
      }
    }
    for (int j = 0; j <= lim + 1; ++j) {
      for (int k = 0; k <= lim + 1; ++k) {
        dp[u][j][k][0] = tmp[j][k][0];
        dp[u][j][k][1] = tmp[j][k][1];
      }
    }
  }
}
int main() {
  cin >> n >> lim;
  for (int i = 1; i < n; ++i) {
    int u, v;
    cin >> u >> v;
    add_edge(u, v);
    add_edge(v, u);
  }
  dfs(1, 0);
  int ans = 0;
  for (int i = 1; i <= lim + 1; ++i) {
    add(ans, dp[1][lim + 1][i][1]);
    add(ans, dp[1][0][i][1]);
  }
  cout << ans << endl;
  return 0;
}
