#include using namespace std; typedef long long ll; const ll mod=1000000007; #define rep(i,n) for(int i=0;i G[2000];bool used[2000]; int k; vector dp[2000]; void merge(int i,int j){ int l1=dp[i].size(); int l2=dp[j].size(); vector nex;nex.resize(l1+l2-1,0); rep(i1,l1){ rep(i2,l2){ nex[i1+i2]+=dp[i][i1]*dp[j][i2]%mod; nex[i1+i2]%=mod; } } dp[i]=nex; } void dfs(int id){ used[id]=true;dp[id].resize(2,0);ll sum=1; dp[id][0]=1; rep(j,G[id].size()){ int to=G[id][j]; if(used[to])continue; dfs(to);merge(id,to); int len=dp[to].size(); sum=sum*dp[to][len-1]%mod; } int len=dp[id].size(); dp[id][len-1]+=sum;dp[id][len-1]%=mod; } int main(){ int n;cin>>n>>k; rep(i,n-1){ int a,b;cin>>a>>b; G[a].push_back(b); G[b].push_back(a); } dfs(0); cout<