#include #define ll long long #define INF 1000000005 #define MOD 1000000007 #define EPS 1e-10 #define rep(i,n) for(int i=0;i<(int)(n);++i) #define rrep(i,n) for(int i=(int)(n)-1;i>=0;--i) #define srep(i,s,t) for(int i=(int)(s);i<(int)(t);++i) #define each(a,b) for(auto (a): (b)) #define all(v) (v).begin(),(v).end() #define len(v) (int)(v).size() #define zip(v) sort(all(v)),v.erase(unique(all(v)),v.end()) #define cmx(x,y) x=max(x,y) #define cmn(x,y) x=min(x,y) #define fi first #define se second #define pb push_back #define show(x) cout<<#x<<" = "<<(x)< P; typedef pair pll; typedef vector vi; typedef vector vvi; typedef vector vl; typedef vector vvl; typedef vector vd; typedef vector

vp; typedef vector vs; const int MAX_N = 2005; int st[MAX_N]; vector G[MAX_N]; int K; void dfs(int u,int p) { st[u] = 1; for(int v : G[u]){ if(v != p){ dfs(v,u); st[u] += st[v]; } } } ll add(ll x,ll y) { return (x + y)%MOD; } ll sub(ll x,ll y) { return (x+MOD-y)%MOD; } ll mul(ll x,ll y) { return x*y%MOD; } vl mul(vl a,vl b,int u) { int n = len(a),m = len(b); int sz = min(st[u]+1,n+m-1); vl res(sz,0); rep(i,n){ rep(j,min(m,st[u]-i+1)){ res[i+j] += mul(a[i],b[j]); } } rep(i,sz){ res[i] %= MOD; } return res; } vl rec(int u,int p) { vl res = {1}; for(int i=0;i> n >> K; vi a(n),b(n); rep(i,n-1){ int a,b; cin >> a >> b; G[a].pb(b),G[b].pb(a); } dfs(0,-1); vl res = rec(0,-1); if(len(res) < K){ cout << "0\n"; }else{ cout << res[K] << "\n"; } return 0; }