#include using namespace std; using Int = long long; //INSERT ABOVE HERE signed main(){ Int n,k; cin>>n>>k; vector > G(n); for(Int i=1;i>x>>y; G[x].emplace_back(y); G[y].emplace_back(x); } const Int MOD = 1e9+7; vector > dp(n); vector sz(n,1); function dfs= [&](Int v,Int p){ for(Int u:G[v]){ if(u==p) continue; dfs(u,v); sz[v]+=sz[u]; } dp[v].assign(sz[v]+1,0); dp[v][0]=1; for(Int u:G[v]){ if(u==p) continue; vector nx(sz[v]+1,0); for(Int i=0;i<=sz[v];i++) for(Int j=0;j<=sz[u];j++) if(i+j<=sz[v]) nx[i+j]+=dp[v][i]*dp[u][j]%MOD; swap(dp[v],nx); for(Int i=0;i<=sz[v];i++) nx[i]%=MOD; } dp[v][sz[v]]=1; }; dfs(0,-1); cout<