#include <bits/stdc++.h>

using namespace std;

inline int read(){
	int x = 0, f = 1;
	char ch = getchar();
	while (! isdigit(ch)){
		if (ch == '-')
			f = - f;
		ch = getchar();
	}
	while (isdigit(ch)){
		x = x * 10 + ch - 48;
		ch = getchar();
	}
	return x * f;
}

void write(int x){
	if (x < 0){
		putchar('-');
		write(- x);
		return;
	}
	if (x >= 10)
		write(x / 10);
	putchar(x % 10 + 48);
	return;
}

inline void writeln(int x){
	write(x);
	puts("");
	return;
}

inline void writesp(int x){
	write(x);
	putchar(' ');
	return;
}

const int mod = 1e9 + 7;

int n, m, ans;
int x[500], y[500];
bool vis[500], edge[500][500], mst[500];
queue < int > q;

inline int qpow(int base, int x){
	int tmp = 1;
	while (x){
		if (x & 1)
			(tmp *= base) %= mod;
		x /= 2;
		(base *= base) %= mod;
	}
	return tmp;
}

inline void calc(){
	int ans = 0;
	for (int i = 1; i <= n; ++ i)
		(ans += (n - i + 1) * qpow(2, max(0, i - 2)) % mod * qpow(2, (m - (i - 1))) % mod) %= mod;
	writeln(ans % mod);
	return;
}

inline bool pd(){
	int rt = 0;
//	for (int i = 1; i <= n; ++ i){
//		for (int j = 1; j <= n; ++ j)
//			writesp(edge[i][j]);
//		puts("");
//	}
//	puts("-----");
	while (! q.empty())
		q.pop();
	for (int i = 1; i <= n; ++ i)
		if (mst[i]){
			rt = i;
			break;
		}
	if (rt == 0)
		return 1;
	q.push(rt);
	while (! q.empty()){
		int x = q.front();
		q.pop();
		if (vis[x])
			continue;
		vis[x] = 1;
		for (int i = 1; i <= n; ++ i)
			if (! vis[i] && edge[x][i])
				q.push(i);
	}
	for (int i = 1; i <= n; ++ i)
		if (vis[i] == 0 && mst[i] == 1)
			return 0;
	return 1;
}

signed main(){
	freopen("barrack.in", "r", stdin);
	freopen("barrack.out", "w", stdout);
	n = read(), m = read();

	bool flag = 1;
	if (flag)
		flag = flag;
	for (int i = 1; i <= m; ++ i){
		x[i] = read(), y[i] = read();
		if (abs(x[i] - y[i]) > 1)
			flag = 0;
	}
	if (flag && m == n - 1){
		calc();
		fclose(stdin);
		fclose(stdout);
		return 0;
	}
	for (int i = 1; i <= (1 << n) - 1; ++ i)
		for (int j = 0; j <= (1 << m) - 1; ++ j){
			memset(vis, 0, sizeof(vis));
			memset(edge, 0, sizeof(edge));
			memset(mst, 0, sizeof(mst));
			for (int k = 0; k < n; ++ k)
				if ((i >> k) & 1)
					mst[k + 1] = 1;
			for (int k = 0; k < m; ++ k)
				if ((j >> k) & 1)
					edge[x[k + 1]][y[k + 1]] = edge[y[k + 1]][x[k + 1]] = 1;
			if (pd())
				ans ++;
//			cout << i << " | " << j << endl;
		}
	writeln(ans);
	fclose(stdin);
	fclose(stdout);
	return 0;
}
