#include <bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
const int maxn = 200;
int n, k;
long long F1[maxn][maxn], F2[maxn][maxn];
vector<int> G[maxn];
void dfs(int x, int fa) {
  for (int i = 0; i < G[x].size(); i++) {
    int y = G[x][i];
    if (y != fa) {
      dfs(y, x);
    }
  }
  for (int i = 0; i < k; i++) {
    long long s1 = 1;
    long long s2 = 1;
    for (int j = 0; j < G[x].size(); j++) {
      int y = G[x][j];
      if (y != fa) {
        long long tmp = F2[y][k] - F2[y][k - i - 1];
        if (i - 1 >= 0) tmp += F1[y][i - 1];
        s1 = s1 * (tmp + mod) % mod;
        tmp = F2[y][k] - F2[y][k - i - 1];
        if (i - 2 >= 0) tmp += F1[y][i - 2];
        s2 = s2 * (tmp + mod) % mod;
      }
    }
    if (i == 0)
      F1[x][i] = s1;
    else
      F1[x][i] = (F1[x][i - 1] + s1 - s2 + mod) % mod;
  }
  for (int i = 0; i <= k; i++) {
    long long s1 = 1;
    long long s2 = 1;
    for (int j = 0; j < G[x].size(); j++) {
      int y = G[x][j];
      if (y != fa) {
        long long tmp = F1[y][k - i - 1] + F2[y][k];
        if (i - 2 >= 0) tmp -= F2[y][i - 2];
        s1 = s1 * (tmp + mod) % mod;
        tmp = F1[y][k - i - 1] + F2[y][k];
        if (i - 1 >= 0) tmp -= F2[y][i - 1];
        s2 = s2 * (tmp + mod) % mod;
      }
    }
    if (i == 0)
      F2[x][i] = s1;
    else
      F2[x][i] = (F2[x][i - 1] + s1 - s2 + mod) % mod;
  }
}
int main() {
  scanf("%d%d", &n, &k);
  for (int i = 1; i <= n - 1; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    G[x].push_back(y);
    G[y].push_back(x);
  }
  dfs(1, 0);
  printf("%d\n", (int)F2[1][k]);
  return 0;
}
