#include <bits/stdc++.h>
using namespace std;
const int N = 105, L = 50, M = 1000000007;
int dp[N][L], x, y, f[L], n, m;
vector<int> g[N];
void dfs(int x, int y) {
  dp[x][0] = dp[x][m + 1] = 1;
  for (int i : g[x])
    if (i != y) {
      dfs(i, x);
      memset(f, 0, sizeof f);
      for (int j = 0; j <= 2 * m; j++)
        for (int k = 0; k <= 2 * m; k++)
          if (j + k <= 2 * m)
            f[min(k + 1, j)] =
                (f[min(k + 1, j)] + (long long)dp[x][j] * dp[i][k]) % M;
          else
            f[max(k + 1, j)] =
                (f[max(k + 1, j)] + (long long)dp[x][j] * dp[i][k]) % M;
      memcpy(dp[x], f, sizeof f);
    }
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i < n; i++) {
    scanf("%d%d", &x, &y);
    g[x].push_back(y);
    g[y].push_back(x);
  }
  dfs(1, 0);
  int ans = 0;
  for (int i = 0; i <= m; i++) ans = (ans + dp[1][i]) % M;
  printf("%d\n", ans);
  return 0;
}
