#include #include #define int long long #define endl "\n" #define all(n) n.begin(),n.end() #define rall(n) n.rbegin(),n.rend() #define rep(i, s, n) for (int i = s; i < (int)(n); i++) #define floatset(n) fixed<using vec=vector; templateusing min_queue=priority_queue,greater>; using ll = long long; using ld = long double; using pll = pair; using Graph = vector>; struct Edge1{ll to,cost;}; using WGraph = vec>; struct BellEdge{ll from,to,cost;}; using BGraph=vec; constexpr ll INF = 1e18; constexpr ll mod = 1000000007; constexpr ll MOD = 998244353; constexpr int dx[4]={1,0,-1,0}; constexpr int dy[4]={0,1,0,-1}; template bool chmin(T&a,T b){return a>b?a=b,true:false;} template bool chmax(T&a,T b){return a void Fill(A (&array)[N], const T &val){ fill( (T*)array, (T*)(array+N), val ); } template void read(Args &...args) { ( std::cin >> ... >> args ); } int N,K; vecG[2010]; int sz[2010]; modint1000000007 dp[2010][2010],nxt[2010]; void dfs(int pa,int now){ sz[now]=1; dp[now][1]=1; for(auto&x:G[now])if(pa!=x){ dfs(now,x); for(int i=0;i<=sz[now];i++){ for(int j=0;j<=sz[x];j++){ nxt[i+j]+=dp[now][i]*dp[x][j]; } } sz[now]+=sz[x]; swap(dp[now],nxt); Fill(nxt,0); } dp[now][0]=1; } signed main(){ read(N,K); for(int i=0;i>A>>B; G[A].push_back(B); G[B].push_back(A); } dfs(-1,0); cout<