#include <bits/stdc++.h>
using namespace std;
long long dp[105][85];
int n, k;
vector<int> e[105];
long long mod = 1e9 + 7;
void dfs(int u, int fa) {
  int len = e[u].size();
  if (len == 1 && fa == e[u][0]) {
    dp[u][k + 1] = 1;
    dp[u][0] = 1;
  } else {
    for (int i = 0; i < len; i++) {
      int v = e[u][i];
      if (v != fa) {
        dfs(v, u);
      }
    }
    for (int i = 0; i <= k; i++) {
      if (i == 0) {
        dp[u][0] = 1;
        for (int j = 0; j < len; j++) {
          int v = e[u][j];
          if (v == fa) continue;
          long long sum = 0;
          for (int l = 0; l <= 2 * k; l++) {
            sum = (sum + dp[v][l]) % mod;
          }
          dp[u][0] = (dp[u][0] * sum) % mod;
        }
      } else {
        long long m1 = 1, m2 = 1;
        for (int j = 0; j < len; j++) {
          int v = e[u][j];
          if (v == fa) continue;
          long long sum = 0;
          for (int l = i - 1; l <= (2 * k - 1 - (i - 1)); l++) {
            sum = (sum + dp[v][l]) % mod;
          }
          m1 = m1 * sum % mod;
          m2 = m2 * (sum - dp[v][i - 1]) % mod;
        }
        dp[u][i] = (m1 - m2) % mod;
      }
    }
    for (int i = k + 1; i <= (2 * k); i++) {
      long long m1 = 1, m2 = 1;
      for (int j = 0; j < len; j++) {
        int v = e[u][j];
        if (v == fa) continue;
        long long sum = 0;
        for (int l = (2 * k - (i - 1)); l <= i - 1; l++) {
          sum = (sum + dp[v][l]) % mod;
        }
        m1 = m1 * sum % mod;
        m2 = m2 * (sum - dp[v][i - 1]) % mod;
      }
      dp[u][i] = (m1 - m2) % mod;
    }
  }
}
int main() {
  while (~scanf("%d%d", &n, &k)) {
    for (int i = 0; i <= 100; i++)
      for (int j = 0; j <= 80; j++) dp[i][j] = 0;
    for (int i = 0; i <= 100; i++) e[i].clear();
    for (int i = 0; i < n - 1; i++) {
      int u, v;
      scanf("%d%d", &u, &v);
      e[u].push_back(v);
      e[v].push_back(u);
    }
    dfs(1, -1);
    long long ans = 0;
    for (int i = 0; i <= k; i++) {
      ans = (ans + dp[1][i]) % mod;
    }
    ans = (ans + mod) % mod;
    printf("%lld\n", ans);
  }
}
