#include <stdio.h>
#include <bits/stdc++.h>

using namespace std;

bool _u;

namespace AK {

typedef long long ll;
typedef double db;

#define rep(i, l, r) for(int i = l, i##end = r; i <= i##end; ++ i)
#define per(i, l, r) for(int i = l, i##end = r; i >= i##end; -- i)
#define pb push_back

template <class T>
inline void chmax(T &x,const T &y) {
	if(x < y) x = y;
}

template <class T>
inline void chmin(T &x, const T &y) {
	if(y < x) x = y;
}

inline int read() {
	int res = 0; char ch = getchar(); bool f = 1;
	for(; ch < '0' || ch > '9'; ch = getchar())
		if(ch == '-') f = 0;
	for(; ch >= '0' && ch <= '9'; ch = getchar())
		res = res * 10 + ch - '0';
	return f ? res : -res;
}

const int N =  1e5 + 15, P = 1e9 + 7;
bool on[N];
int fa[N], n, m;
int dep[N];
ll pw[N];

vector <int> G[N];

inline void vadd(int x, int y) {
	//printf("%d %d\n", x, y);
	//for(int v : G[x]) if(v == y) return ;
	G[x].pb(y);
	G[y].pb(x);
}

void dfs1(int u, int f) {
	fa[u] = f;
	dep[u] = dep[f] + 1;
	for(int v : G[u]) {
		if(v == f) continue;
		dfs1(v, u);
	}
}

void walk(int x, int y) {
	if(dep[x] > dep[y]) swap(x, y);
	while(dep[x] < dep[y]) on[y] = 1, y = fa[y];
	//if(x == y) return ;
	while(x != y) on[x] = on[y] = 1, x = fa[x], y = fa[y];
}


void Main() {
	int x, y;
	n = read(); read();
	rep(i, 1, n - 1) {
		x = read(); y = read();
		vadd(x, y); vadd(y, x);
	}
	dfs1(1, 0);
	pw[0] = 1;
	rep(i, 1, n) pw[i] = pw[i - 1] * 2 % P;
	ll ans = 0;
	rep(S, 1, (1 << n) - 1) {
		memset(on, 0, sizeof(on));
		rep(i, 1, n) rep(j, i + 1, n)
			if(S >> i - 1 & 1 && S >> j - 1 & 1)
				walk(i, j);
		int cnt = 0;
		rep(i, 1, n) cnt += on[i];
		ans += pw[n - 1 - cnt];
	}
	printf("%lld\n", ans);
}

}

bool _v;

signed main() {
	//freopen("plant.in", "r", stdin);
	//freopen("plant.out", "w", stdout);
	clock_t st = clock();
	AK :: Main();
	printf("==============================\n");
	cerr << "time = " << (clock() - st) * 1.0 / CLOCKS_PER_SEC << endl;
	cerr << "space = " << (&_u - &_v) / 1048576.0 << endl;
	return 0;
}
