#include<bits/stdc++.h>

#define REP(i, n) for(int i = 0; i< n; i++)

#define MOD 1000000007

#define SIZE 234

using namespace std;

typedef long long ll;


int n, K;
vector<int> e[SIZE];

vector<ll> A[SIZE], B[SIZE], C[SIZE], D[SIZE], E[SIZE];

void convolve(const vector<ll> &a, const vector<ll> &b, vector<ll> &ret){
	ret.resize(K+1, 0);
	REP(i, K+1){
		ll x = 0;
		REP(j, i+1){
			x = (x+a[j]*b[i-j]) % MOD;
		}
		ret[i] = x;
	}
}

void compute_vertex(int v, int p = -1){
	if(e[v].size() == 1 && p!=-1){
		A[v][1] = 1;
		C[v][0] = 1;
		D[v][0] = D[v][1] = 1;
		E[v][0] = 1;
		return;
	} else{
		vector<ll> tmp1, tmp2, tmp3;
		
		// A
		tmp1.resize(K+1, 0);
		tmp1[0] = 1;
		for(auto w : e[v])if(w != p){
			convolve(tmp1, C[w], tmp2);
			swap(tmp1, tmp2);
		}
		REP(i, K){
			A[v][i+1] = tmp1[i];
		}
		
		// C
		tmp3.resize(K+1, 0);
		tmp3[0] = 1;
		for(auto w : e[v])if(w != p){
			convolve(tmp3, E[w], tmp2);
			swap(tmp3, tmp2);
		}
		REP(i, K+1){
			C[v][i] = tmp3[i];
		}
		
		// B
		tmp3.clear();
		tmp3.resize(K+1, 0);
		tmp3[0] = 1;
		for(auto w : e[v])if(w != p){
			convolve(tmp3, D[w], tmp2);
			swap(tmp3, tmp2);
		}
		REP(i, K+1){
			tmp2[i] = (tmp3[i]-tmp1[i]) % MOD;
			if(tmp2[i] < 0)tmp2[i]+=MOD;
		}
		REP(i, K){
			B[v][i+1] = tmp2[i];
		}
		
		// D
		REP(i, K+1){
			D[v][i] = (A[v][i] + B[v][i] + C[v][i]) % MOD;
		}
		// E
		REP(i, K+1){
			E[v][i] = (B[v][i] + C[v][i]) % MOD;
		}
		
	}
}

void dfs(int v, int p=-1){
	//cerr << "df " << v << endl;
	for(auto w : e[v])if(w != p)dfs(w, v);
	compute_vertex(v, p);
}



bool testcase(){
	cin >> n >> K;
	if(cin.fail())return false;
	int a, b;
	REP(i, n)e[i].clear();
	REP(i, n-1){
		cin >> a >> b;
		a--;b--;
		e[a].push_back(b);
		e[b].push_back(a);
	}
	
	REP(i, n){
		A[i].clear();
		B[i].clear();
		C[i].clear();
		D[i].clear();
		E[i].clear();
		A[i].resize(K+1, 0);
		B[i].resize(K+1, 0);
		C[i].resize(K+1, 0);
		D[i].resize(K+1, 0);
		E[i].resize(K+1, 0);
	}
	
	dfs(0);
	/*REP(i, n){
		cerr << "vert" << i << endl;
		cerr << "A" << endl;
		REP(j, K+1)cerr<< A[i][j] << " ";
		cerr << endl;
		cerr << "B" << endl;
		REP(j, K+1)cerr<< B[i][j] << " ";
		cerr << endl;
		cerr << "C" << endl;
		REP(j, K+1)cerr<< C[i][j] << " ";
		cerr << endl;
		cerr << "D" << endl;
		REP(j, K+1)cerr<< D[i][j] << " ";
		cerr << endl;
		cerr << "E" << endl;
		REP(j, K+1)cerr<< E[i][j] << " ";
		cerr << endl;
	
	}*/
	
	ll ret = (E[0][K]+MOD) % MOD;
	
	cout << ret << endl;

	return true;
}

int main(){
	while(testcase());
	return 0;
}
