func_code_string: #include <bits/stdc++.h>   template <class T>   inline void read(T &x) {     T f = 1;     x = 0;     char s = getchar();     while (s <  0  || s >  9 ) {       if (s ==  - ) f = -1;       s = getchar();     }     while (s >=  0  && s <=  9 ) {       x = x * 10 + s -  0 ;       s = getchar();     }     x *= f;   }   const int p = 1e9 + 7;   struct Edge {     int u, v;   } e[201];   int head[101], ecnt;   inline void addedge(int u, int v) {     e[++ecnt].v = v;     e[ecnt].u = head[u];     head[u] = ecnt;   }   inline void add(int u, int v) {     addedge(u, v);     addedge(v, u);   }   int f[101][41], a, b, ans, n, k, g[101];   inline void dfs(int x, int fa) {     f[x][0] = 1;     f[x][k + 1] = 1;     for (int yny = head[x], v; yny && (v = e[yny].v); yny = e[yny].u) {       if (v == fa) continue;       dfs(v, x);       memset(g, 0, sizeof(g));       for (int i = 0; i <= 2 * k; i++)         for (int j = 0; j <= 2 * k; j++) {           if ((i + j) > (2 * k))             (g[std::max(i, j + 1)] += 1ll * f[x][i] * f[v][j] % p) %= p;           else             (g[std::min(i, j + 1)] += 1ll * f[x][i] * f[v][j] % p) %= p;         }       for (int i = 0; i <= 2 * k; i++) f[x][i] = g[i];     }   }   inline void solve() {     read(n);     read(k);     for (int i = 1; i <= n - 1; i++) read(a), read(b), add(a, b);     dfs(1, 0);     for (int i = 0; i <= k; i++) (ans += f[1][i]) %= p;     printf( %d n , ans);   }   signed main() { solve(); }   