#include <bits/stdc++.h>
using namespace std;
int n, m, tot;
int f[105][2][105], g[105][105];
vector<int> e[105];
void dfs(int x, int fa) {
  f[x][1][0] = 1;
  f[x][0][0] = 1;
  int v;
  for (int i = 0; i < e[x].size(); ++i)
    if (e[x][i] != fa) {
      v = e[x][i];
      dfs(v, x);
      f[x][0][0] = 1LL * f[x][0][0] * f[v][1][m] % 1000000007;
      int t = 0;
      for (int j = 0; j <= m; ++j) t = (t + f[v][1][j]) % 1000000007;
      for (int j = 0; j < m; ++j) t = (t + f[v][0][j]) % 1000000007;
      f[x][1][0] = 1LL * f[x][1][0] * t % 1000000007;
    }
  for (int i = 0; i < e[x].size(); ++i)
    if (e[x][i] != fa) {
      for (int j = 0; j < m - 1; ++j) {
        v = e[x][i];
        int t = f[v][0][j];
        for (int k = 0; k < i; ++k)
          if (e[x][k] != fa) {
            int p = 0;
            for (int l = 0; l <= j; ++l)
              p = (p + f[e[x][k]][0][l]) % 1000000007;
            for (int l = m - j - 1; l <= m; ++l)
              p = (p + f[e[x][k]][1][l]) % 1000000007;
            t = 1LL * t * p % 1000000007;
          }
        for (int k = i + 1; k < e[x].size(); ++k)
          if (e[x][k] != fa) {
            int p = 0;
            for (int l = 0; l < j; ++l) p = (p + f[e[x][k]][0][l]) % 1000000007;
            for (int l = m - j - 1; l <= m; ++l)
              p = (p + f[e[x][k]][1][l]) % 1000000007;
            t = 1LL * t * p % 1000000007;
          }
        (f[x][0][j + 1] += t) %= 1000000007;
      }
      for (int j = 0; j < m; ++j) {
        v = e[x][i];
        int t = f[v][1][j];
        for (int k = 0; k < i; ++k)
          if (e[x][k] != fa) {
            int p = 0;
            for (int l = 0; l < m - j - 1; ++l)
              p = (p + f[e[x][k]][0][l]) % 1000000007;
            for (int l = j; l <= m; ++l)
              p = (p + f[e[x][k]][1][l]) % 1000000007;
            t = 1LL * t * p % 1000000007;
          }
        for (int k = i + 1; k < e[x].size(); ++k)
          if (e[x][k] != fa) {
            int p = 0;
            for (int l = 0; l < m - j - 1; ++l)
              p = (p + f[e[x][k]][0][l]) % 1000000007;
            for (int l = j + 1; l <= m; ++l)
              p = (p + f[e[x][k]][1][l]) % 1000000007;
            t = 1LL * t * p % 1000000007;
          }
        (f[x][1][j + 1] += t) %= 1000000007;
      }
    }
}
int main() {
  scanf("%d%d", &n, &m);
  for (int x, y, i = 1; i < n; ++i)
    scanf("%d%d", &x, &y), e[x].push_back(y), e[y].push_back(x);
  dfs(1, 0);
  int ans = 0;
  for (int i = 0; i <= m; ++i) ans = (ans + f[1][1][i]) % 1000000007;
  printf("%d\n", ans);
}
