#include <bits/stdc++.h>
using namespace std;
int const N = 111;
int const K = 25;
int const MOD = 1e9 + 7;
int n, m, dp[N][N][K][K], k;
vector<int> e[N];
int mul(int a, int b) { return a * 1LL * b % MOD; }
void add(int &a, int b) {
  a += b;
  if (a >= MOD) {
    a -= MOD;
  }
}
void read() {
  scanf("%d%d", &n, &k);
  for (int i = 0; i < n - 1; ++i) {
    int u, v;
    scanf("%d%d", &u, &v);
    --u;
    --v;
    e[u].push_back(v);
    e[v].push_back(u);
  }
}
void prepare() {}
void dfs(int u, int p) {
  if (u == p) {
    e[u].push_back(u);
  }
  for (int i = 0; i < e[u].size(); ++i) {
    int to = e[u][i];
    if (to == p) {
      swap(e[u][i], e[u][0]);
      continue;
    }
    dfs(to, u);
  }
  dp[u][0][0][k + 1] = 1;
  dp[u][0][k + 1][0] = 1;
  for (int i = 1; i < (int)(e[u].size()); ++i) {
    int to = e[u][i];
    for (int b = 0; b <= k + 1; ++b) {
      for (int w = 0; w <= k + 1; ++w) {
        for (int b1 = 0; b1 <= k + 1; ++b1) {
          for (int w1 = 0; w1 <= k + 1; ++w1) {
            if (w == k || w1 == k) {
              continue;
            }
            int curW = w;
            int curB = b;
            int curW1 = w1;
            int curB1 = b1;
            int miniB = min(curB, curB1 + 1);
            int maxiW;
            if (curW + curB1 + 1 <= k) {
              curW = k + 1;
            }
            if (curW1 + 1 + curB <= k) {
              curW1 = k + 1;
            }
            if (curW == k + 1 || curW1 == k + 1) {
              if (curW1 == k + 1) {
                maxiW = curW;
              } else {
                maxiW = curW1 + 1;
              }
            } else {
              maxiW = max(curW, curW1 + 1);
            }
            add(dp[u][i][miniB][maxiW],
                mul(dp[u][i - 1][b][w],
                    dp[to][(int)(e[to].size()) - 1][b1][w1]));
          }
        }
      }
    }
  }
}
void solve() {
  dfs(0, 0);
  int ans = 0;
  for (int i = 0; i <= k + 1; ++i) {
    add(ans, dp[0][(int)(e[0].size()) - 1][i][k + 1]);
  }
  printf("%d\n", ans);
}
int main() {
  prepare();
  read();
  solve();
  return 0;
}
