#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
vector<int> g[102];
int dp[102][22][22];
int nt[22][22];
int n, k, a, b;
void dfs(int u, int p) {
  dp[u][0][k + 1] = 1;
  dp[u][k + 1][0] = 1;
  for (int i = 0; i < g[u].size(); i++) {
    int v = g[u][i];
    if (v == p) continue;
    dfs(v, u);
    memset(nt, 0, sizeof(nt));
    for (int a = 0; a <= k + 1; a++) {
      for (int b = 0; b <= k + 1; b++) {
        for (int c = 0; c <= k + 1; c++) {
          for (int d = 0; d <= k + 1; d++) {
            int va = 0, vb = 0;
            if (a != k + 1 && c != k + 1) {
              if (b != k + 1 && d != k + 1) {
                if (c + b + 1 <= k && a + d + 1 <= k) {
                  va = k + 1;
                } else if (c + b + 1 <= k) {
                  va = a;
                } else if (a + d + 1 <= k) {
                  if (c + 1 > k) continue;
                  va = c + 1;
                } else {
                  if (c + 1 > k) continue;
                  va = max(a, c + 1);
                }
              } else if (b != k + 1) {
                if (c + b + 1 <= k)
                  va = a;
                else {
                  if (c + 1 > k) continue;
                  va = max(a, c + 1);
                }
              } else if (d != k + 1) {
                if (a + d + 1 <= k) {
                  if (c + 1 > k) continue;
                  va = c + 1;
                } else {
                  if (c + 1 > k) continue;
                  va = max(a, c + 1);
                }
              } else {
                if (c + 1 > k) continue;
                va = max(a, c + 1);
              }
            } else if (a != k + 1) {
              if (d != k + 1) {
                if (a + d + 1 <= k)
                  va = k + 1;
                else
                  va = a;
              } else
                va = a;
            } else if (c != k + 1) {
              if (b != k + 1) {
                if (c + b + 1 <= k)
                  va = k + 1;
                else {
                  if (c + 1 > k) continue;
                  va = c + 1;
                }
              } else {
                if (c + 1 > k) continue;
                va = c + 1;
              }
            } else
              va = k + 1;
            if (b != k + 1 && d != k + 1) {
              vb = min(b, d + 1);
            } else if (b != k + 1) {
              vb = b;
            } else if (d != k + 1) {
              vb = d + 1;
            } else {
              vb = k + 1;
            }
            nt[va][vb] = (nt[va][vb] + dp[u][a][b] * 1ll * dp[v][c][d]) % mod;
          }
        }
      }
    }
    for (int a = 0; a <= k + 1; a++)
      for (int b = 0; b <= k + 1; b++) dp[u][a][b] = nt[a][b];
  }
}
int main() {
  scanf("%d%d", &n, &k);
  for (int i = 2; i <= n; i++) {
    scanf("%d%d", &a, &b);
    g[a].push_back(b);
    g[b].push_back(a);
  }
  dfs(1, 0);
  int ans = 0;
  for (int b = 0; b <= k + 1; b++) ans = (ans + dp[1][k + 1][b]) % mod;
  printf("%d\n", ans);
}
