func_code_string: #include <bits/stdc++.h>   inline int getint() {     int x = 0, p = 1;     char c = getchar();     while (c <= 32) c = getchar();     if (c == 45) p = -p, c = getchar();     while (c > 32) x = x * 10 + c - 48, c = getchar();     return x * p;   }   using namespace std;   const int N = 110;   const int M = 25;   int dp[N][M][M], n, k, res, tmp[N][M][M];   vector<int> G[N];   inline void add(int &x, int y) {     x += y;     if (x >= 1000000007) x -= 1000000007;   }   inline int mul(int x, int y) {     long long ans = 1ll * x * y;     return ans % 1000000007;   }   void go(int x, int p) {     vector<int> v;     for (int(i) = 0; (i) < (G[x].size()); (i)++) {       int to = G[x][i];       if (to != p) {         go(to, x);         v.push_back(to);       }     }     tmp[0][1][M - 1] = tmp[0][0][1] = 1;     for (int(i) = 0; (i) < (v.size()); (i)++) {       int x = v[i];       for (int(i0) = 0; (i0) < (M); (i0)++)         for (int(i1) = 0; (i1) < (M); (i1)++) tmp[i + 1][i0][i1] = 0;       for (int(i0) = 0; (i0) < (k + 2); (i0)++)         for (int(i1) = 0; (i1) < (M); (i1)++) {           for (int(i2) = 0; (i2) < (k + 2); (i2)++)             for (int(i3) = 0; (i3) < (M); (i3)++) {               int hh = mul(tmp[i][i0][i1], dp[x][i2][i3]);               if ((!i2 || i1 + i2 - 1 <= k) && (!i0 || i0 + i3 - 1 <= k)) {                 add(tmp[i + 1][0][min(i1, i3 + 1)], hh);                 continue;               }               if (!i2 || i1 + i2 - 1 <= k) {                 add(tmp[i + 1][i0][min(i1, i3 + 1)], hh);                 continue;               }               if (!i0 || i0 + i3 - 1 <= k) {                 if (i2 <= k) add(tmp[i + 1][i2 + 1][min(i1, i3 + 1)], hh);                 continue;               }               if (i2 <= k) add(tmp[i + 1][max(i0, i2 + 1)][min(i1, i3 + 1)], hh);             }         }     }     for (int(i) = 0; (i) < (k + 2); (i)++)       for (int(j) = 0; (j) < (M); (j)++) dp[x][i][j] = tmp[v.size()][i][j];   }   int main() {     n = getint();     k = getint();     for (int(i) = 0; (i) < (n - 1); (i)++) {       int x = getint() - 1, y = getint() - 1;       G[x].push_back(y);       G[y].push_back(x);     }     go(0, -1);     for (int i = 1; i <= k + 1; i++)       if (dp[0][0][i] > 0) add(res, dp[0][0][i]);     printf( %d n , res);     return 0;   }   