#include <bits/stdc++.h>
using namespace std;
int n, k, u, v;
long long ans, fl[25], fw[25], dp[2][105][25];
vector<int> G[105];
void dfs(int u, int fa) {
  for (int v : G[u])
    if (v != fa) dfs(v, u);
  dp[0][u][0] = dp[1][u][0] = 1;
  for (int v : G[u])
    if (v != fa) {
      memset(fl, 0, sizeof(fl));
      memset(fw, 0, sizeof(fw));
      for (int i = 0; i <= k; i++) {
        for (int j = 0; j <= k; j++)
          fw[min(i, j + 1)] += dp[0][u][i] * dp[0][v][j] % 1000000007;
        for (int j = 0; j <= k; j++)
          if (k - i >= j + 1)
            fw[i] += dp[0][u][i] * dp[1][v][j] % 1000000007;
          else
            fl[j + 1] += dp[0][u][i] * dp[1][v][j] % 1000000007;
      }
      for (int i = 0; i <= k; i++) {
        for (int j = 0; j <= k; j++)
          if (k - j - 1 >= i)
            fw[j + 1] += dp[1][u][i] * dp[0][v][j] % 1000000007;
          else
            fl[i] += dp[1][u][i] * dp[0][v][j] % 1000000007;
        for (int j = 0; j <= k; j++)
          fl[max(i, j + 1)] += dp[1][u][i] * dp[1][v][j] % 1000000007;
      }
      for (int i = 0; i <= k; i++) {
        dp[0][u][i] = fw[i] % 1000000007;
        dp[1][u][i] = fl[i] % 1000000007;
      }
    }
}
int main() {
  cin.sync_with_stdio(false);
  cin >> n >> k;
  for (int i = 1; i < n; i++) {
    cin >> u >> v;
    G[u].push_back(v);
    G[v].push_back(u);
  }
  dfs(1, -1);
  for (int i = 0; i <= k; i++) ans = (ans + dp[0][1][i]) % 1000000007;
  cout << ans << endl;
}
