#include <bits/stdc++.h>
using namespace std;
long long int modulo = 1e9 + 7;
const int limite = 105;
void anyade(long long int &a, long long int b) { a = (a + b) % modulo; }
int n, k;
vector<int> g[limite];
int WHITE = 0;
int BLACK = 1;
long long int maneras[limite][2][2][limite];
long long int nextmaneras[limite][2][2][limite];
void extiende(int needv, int lenv, int color, int &need, int &len, bool &ok) {
  ok = true;
  if (needv and lenv == 0) {
    ok = false;
    return;
  }
  if (color == BLACK) {
    len = 0;
    need = false;
    return;
  }
  if (needv) {
    need = true;
    len = lenv - 1;
    if (len == 0) {
      ok = false;
      return;
    }
  } else {
    need = false;
    len = lenv + 1;
    if (len == k + 1) {
      len = k;
      need = true;
    }
  }
  if (need and len == 0) ok = false;
}
void combina(int needv, int lenv, int needu, int lenu, int color, int &need,
             int &len, bool &ok) {
  extiende(needv, lenv, color, needv, lenv, ok);
  if (ok == false) return;
  if (color == BLACK) {
    need = false;
    len = 0;
    return;
  }
  if (needu and needv) {
    need = true;
    len = min(lenu, lenv);
  } else if (needu) {
    if (lenu < lenv) {
      need = true;
      len = lenu;
    } else {
      need = false;
      len = lenv;
    }
  } else if (needv) {
    if (lenv < lenu) {
      need = true;
      len = lenv;
    } else {
      need = false;
      len = lenu;
    }
  } else {
    need = false;
    len = min(lenu, lenv);
  }
}
void reset(long long int &a, long long int &b) {
  swap(a, b);
  b = 0;
}
void reset(int u) {
  for (int color = 0; color < 2; color++)
    for (int need = 0; need < 2; need++)
      for (int len = 0; len <= k; len++)
        reset(maneras[u][color][need][len], nextmaneras[u][color][need][len]);
}
void calcula(int u) {
  vector<int> &ar = g[u];
  if (int(ar.size()) == 0) {
    maneras[u][BLACK][0][0] = 1;
    maneras[u][WHITE][1][k] = 1;
    return;
  }
  for (int i = 0; i < int(ar.size()); i++) {
    int v = ar[i];
    calcula(v);
    int need, len;
    bool ok;
    if (i == 0) {
      for (int colorv = 0; colorv < 2; colorv++) {
        for (int needv = 0; needv < 2; needv++) {
          for (int lenv = 0; lenv <= k; lenv++) {
            for (int color = 0; color < 2; color++) {
              if (maneras[v][colorv][needv][lenv] == 0) continue;
              extiende(needv, lenv, color, need, len, ok);
              if (ok) {
                anyade(maneras[u][color][need][len],
                       maneras[v][colorv][needv][lenv]);
              }
            }
          }
        }
      }
    } else {
      for (int colorv = 0; colorv < 2; colorv++) {
        for (int needv = 0; needv < 2; needv++) {
          for (int lenv = 0; lenv <= k; lenv++) {
            for (int color = 0; color < 2; color++) {
              for (int needu = 0; needu < 2; needu++) {
                for (int lenu = 0; lenu <= k; lenu++) {
                  if (maneras[u][color][needu][lenu] == 0 or
                      maneras[v][colorv][needv][lenv] == 0)
                    continue;
                  combina(needv, lenv, needu, lenu, color, need, len, ok);
                  if (ok) {
                    anyade(nextmaneras[u][color][need][len],
                           maneras[u][color][needu][lenu] *
                               maneras[v][colorv][needv][lenv]);
                  }
                }
              }
            }
          }
        }
      }
      reset(u);
    }
  }
  long long int manneed0 = 0;
  long long int manneed1 = 0;
  for (int color = 0; color < 2; color++) {
    for (int len = 0; len <= k; len++) {
      anyade(manneed0, maneras[u][color][0][len]);
      anyade(manneed1, maneras[u][color][1][len]);
    }
  }
}
void eliminapadre(int u, int p) {
  vector<int> &ar = g[u];
  vector<int> nextar;
  for (int i = 0; i < int(ar.size()); i++) {
    int v = ar[i];
    if (v != p) {
      nextar.push_back(v);
      eliminapadre(v, u);
    }
  }
  ar = nextar;
}
int main() {
  cin >> n >> k;
  for (int i = 0; i < n - 1; i++) {
    int u, v;
    cin >> u >> v;
    g[u].push_back(v);
    g[v].push_back(u);
  }
  eliminapadre(1, 0);
  calcula(1);
  long long int sol = 0;
  for (int color = 0; color < 2; color++)
    for (int len = 0; len <= k; len++) anyade(sol, maneras[1][color][0][len]);
  cout << sol << endl;
}
