#include <bits/stdc++.h>
using namespace std;
int n, k;
struct edge {
  int to, nxt;
} ed[220];
int edcnt = 0;
int hd[110];
inline void adde(int u, int v) {
  ed[++edcnt].to = v;
  ed[edcnt].nxt = hd[u];
  hd[u] = edcnt;
}
long long dp[110][25][25], t[25][25];
long long mod = 1e9 + 7;
void dfs(int u, int fa) {
  dp[u][0][1] = 1;
  dp[u][1][0] = 1;
  for (int id = hd[u]; id; id = ed[id].nxt) {
    int v = ed[id].to;
    if (v == fa) continue;
    dfs(v, u);
    memset(t, 0, sizeof t);
    for (int i = 0; i <= k + 1; ++i)
      for (int a = 0; a <= k + 1; ++a)
        if (dp[u][i][a])
          for (int j = 0; j <= k + 1; ++j)
            for (int b = 0; b <= k + 1; ++b)
              if (dp[v][j][b]) {
                int mib = 9999999, mxd = 0;
                if (i) mib = i;
                if (j) mib = min(mib, j + 1);
                if (mib > k + 1) mib = 0;
                if (a != 0 && (j == 0 || a + j - 1 > k)) mxd = a;
                if (b != 0 && (i == 0 || b + i - 1 > k)) mxd = max(mxd, b + 1);
                t[mib][mxd] = (t[mib][mxd] + dp[u][i][a] * dp[v][j][b]) % mod;
              }
    memcpy(dp[u], t, sizeof t);
  }
}
int main() {
  scanf("%d%d", &n, &k);
  for (int i = 1, u, v; i < n; ++i) {
    scanf("%d%d", &u, &v);
    adde(u, v);
    adde(v, u);
  }
  dfs(1, 1);
  long long ans = 0;
  for (int i = 0; i <= k + 1; ++i) ans = (ans + dp[1][i][0]) % mod;
  printf("%lld", ans);
}
