func_code_string: #include <bits/stdc++.h>   using namespace std;   const int mod = 1000000007;   const int maxn = 100010;   const int INF = ~0U >> 1;   const double eps = 1e-9;   void getint(int &ret) {     char ch;     while (ch = getchar(), ch <  0  || ch >  9 )       ;     ret = ch -  0 ;     while (ch = getchar(), ch >=  0  && ch <=  9 ) ret = ret * 10 + ch -  0 ;   }   const int maxN = 210;   const int maxK = 42;   int nxt[maxN * 2], first[maxN], to[maxN * 2], vis[maxN], tot;   void add_edge(int x, int y) {     nxt[++tot] = first[x];     first[x] = tot;     to[tot] = y;   }   int dp[maxN][maxK * 2];   int f[maxK * 2][maxK * 2], g[maxK * 2][maxK * 2];   vector<int> son[maxN];   int n, k;   void dfs(int x) {     vis[x] = 1;     for (int i = first[x]; i; i = nxt[i])       if (!vis[to[i]]) {         son[x].push_back(to[i]);         dfs(to[i]);       }     if (son[x].empty()) {       dp[x][1 + k] = 1;       dp[x][-k + k] = 1;       return;     }     memset(f, 0, sizeof(f));     for (int i = -k; i <= k; i++) {       f[i + k][i + k] = (f[i + k][i + k] + dp[son[x][0]][i + k]) % mod;     }     for (int kt = 1; kt < son[x].size(); kt++) {       int Son = son[x][kt];       memset(g, 0, sizeof(g));       for (int Min = -k; Min <= k; Min++)         for (int Max = Min; Max <= k; Max++) {           if (f[Min + k][Max + k]) {             for (int L = -k; L <= k; L++) {               long long tmp = dp[Son][L + k];               g[min(Min, L) + k][max(Max, L) + k] =                   (g[min(Min, L) + k][max(Max, L) + k] +                    1ll * f[Min + k][Max + k] * tmp % mod) %                   mod;             }           }         }       for (int Min = -k; Min <= k; Min++)         for (int Max = Min; Max <= k; Max++)           f[Min + k][Max + k] = g[Min + k][Max + k];     }     for (int Min = -k; Min <= k; Min++)       for (int Max = Min; Max <= k; Max++) {         if (Min < k) {           if (Max + Min + 1 <= 0)             dp[x][Min + 1 + k] = (dp[x][Min + 1 + k] + f[Min + k][Max + k]) % mod;           else if (Max < k)             dp[x][Max + 1 + k] = (dp[x][Max + 1 + k] + f[Min + k][Max + k]) % mod;         }         dp[x][-k + k] = (dp[x][-k + k] + f[Min + k][Max + k]) % mod;       }   }   int main() {     cin >> n >> k;     if (k == 0) {       puts( 1 );       return 0;     }     for (int i = 1; i < n; i++) {       int x, y;       scanf( %d%d , &x, &y);       add_edge(x, y);       add_edge(y, x);     }     int ans = 0;     dfs(1);     for (int i = -k; i <= 0; i++) ans = (ans + dp[1][i + k]) % mod;     cout << ans;     return 0;   }   