#include <bits/stdc++.h>
#define int long long
using namespace std;
const int MAXN = 5e3 + 10;
const int mod = 1e9 + 7;
int n, m, ans;
//namespace ot
//{
//	signed main()
//	{
//		for (int i = 1; i <= n; i++)
//		{
//			
//		}
//		return 0;
//	}
//}
int a[MAXN], sum[MAXN];
int C[MAXN][MAXN];
int rd[MAXN][2];
int vis[MAXN], b[MAXN], tim;
int head[MAXN], cnt;
struct node {
	int v, prev;
} e[MAXN << 1];
void add(int u, int v)
{
	e[++cnt] = {v, head[u]};
	head[u] = cnt;
}
void dfs(int u, int fa, int rt)
{
	if (vis[rt] == tim && u == rt)
		return void(b[rt] = 1);
	if (b[rt] || vis[u] == tim)
		return;
	vis[u] = tim;
	for (int i = head[u]; i; i = e[i].prev)
	{
		int v = e[i].v;
		if (v == fa) continue;
		dfs(v, u, rt);
	}
}
void init()
{
	C[0][0] = 1;
	for (int i = 1; i <= n; i++)
	{
		C[i][0] = C[i][i] = 1;
		for (int j = 1; j < i; j++)
			C[i][j] = (C[i - 1][j - 1] + C[i - 1][j]) % mod;
		for (int j = 2; j <= i; j++)
			sum[i] = (sum[i] + C[i][j]) % mod;
	}
}
signed main()
{
	freopen("barrack.in", "r", stdin);
	freopen("barrack.out", "w", stdout);
	cin >> n >> m;
//	int flag = 1;
	for (int i = 1; i <= m; i++)
	{
		int u, v;
		cin >> u >> v;
//		flag &= (u == i && v == i + 1);
		add(u, v);
		add(v, u);
		rd[i][0] = u;
		rd[i][1] = v;
	}
//	if (m > 25 && flag)
//		return ot :: main();
	init();
	for (int i = 1; i <= n; i++)
	{
		tim++;
		dfs(i, i, i);
	}
	for (int i = 0; i < (1 << m); i++)
	{
		for (int j = 1; j <= n; j++)
			vis[j] = b[j];
		for (int j = 1; j <= m; j++)
			if (i & (1 << (j - 1)))
				vis[rd[j][0]] = vis[rd[j][1]] = 1;
		int tot = 0;
		for (int j = 1; j <= n; j++)
			tot += vis[j];
		ans = (ans + sum[tot] + n) % mod;
	}
	cout << ans << endl;
	return 0;
}
