#include <bits/stdc++.h>
using namespace std;
int n, m, cnt, h[101];
struct data {
  int to, next;
} edge[101 << 1];
long long f[101][101], g[101], ans;
bool vis[101];
void read(int &x, char ch = getchar()) {
  for (; ch < '0' || ch > '9'; ch = getchar())
    ;
  for (x = 0; ch >= '0' && ch <= '9'; ch = getchar())
    x = (x << 1) + (x << 3) + ch - '0';
}
void add(int u, int v) {
  edge[++cnt] = (data){v, h[u]}, h[u] = cnt, edge[++cnt] = (data){u, h[v]},
  h[v] = cnt;
}
void dfs(int x) {
  int i, j, k;
  f[x][0] = f[x][m + 1] = 1, vis[x] = true;
  for (i = h[x]; i; i = edge[i].next)
    if (!vis[edge[i].to]) {
      dfs(edge[i].to), memset(g, 0, sizeof(g));
      for (j = 0; j <= 2 * m + 1; ++j)
        for (k = 0; k <= 2 * m; ++k)
          if (j + k <= 2 * m)
            (g[min(j, k + 1)] += (long long)f[x][j] * f[edge[i].to][k] %
                                 1000000007LL) %= 1000000007LL;
          else
            (g[max(j, k + 1)] += (long long)f[x][j] * f[edge[i].to][k] %
                                 1000000007LL) %= 1000000007LL;
      memcpy(f[x], g, sizeof(g));
    }
}
int main() {
  int i, x, y;
  read(n), read(m);
  for (i = 1; i < n; ++i) read(x), read(y), add(x, y);
  dfs(1);
  for (i = 0; i <= m; ++i) (ans += f[1][i]) %= 1000000007LL;
  return printf("%I64d", ans), 0;
}
