#include<bits/stdc++.h>
#define LL long long
using namespace std;
const int N = 1e2 + 10,MOD = 1e9 + 7;
int n,m,tot = 1,tt = 1,id,k,q,cnt;
int head[N],to[N << 1],last[N << 1],dfn[N],low[N],bg[N],bgu[N];
int hd[N],t[N],lat[N];
int c[N],key[N],a[N];
LL ans;
bool vis[N << 1],used[N << 1],book[N],f;
int read() {
	int x = 0,f = 1;
	char c = getchar();
	while(c < '0' || c > '9') {
		if(c == '-')	f = -1;
		c = getchar();
	}
	while(c >= '0' && c <= '9') {
		x = (x << 1) + (x << 3) + (c ^ 48);
		c = getchar();
	}
	return x * f;
}
void add(int u,int v) {
	to[++ tot] = v,last[tot] = head[u],head[u] = tot;
	to[++ tot] = u,last[tot] = head[v],head[v] = tot;
}
void ad(int u,int v) {
	t[++ tt] = v,lat[tt] = hd[u],hd[u] = tt;
	t[++ tt] = u,lat[tt] = hd[v],hd[v] = tt;
}
void Tarjan(int u) {
	dfn[u] = low[u] = ++ id;
	for(int i = head[u];i;i = last[i]) {
		if(vis[i])	continue;
		vis[i] = vis[i ^ 1] = true;
		if(!dfn[to[i]]) {
			Tarjan(to[i]);
			low[u] = min(low[u],low[to[i]]);
			if(dfn[u] < low[to[i]])	bg[++ k] = i,bgu[k] = u;
		}
		else	low[u] = min(low[u],dfn[to[i]]);
	}
	return;
}
void dfs(int u) {
	book[u] = true,c[q] ++,key[u] = q;
	for(int i = head[u];i;i = last[i]) {
		if(vis[i] || book[to[i]])	continue;
		vis[i] = vis[i ^ 1] = true;
		dfs(to[i]);
	}
	return;
}
void find(int u,int aim) {
	if(u == aim) {f = 1;return;}
	for(int i = hd[u];i;i = lat[i]) {
		if(vis[i] || used[i])	continue;
		vis[i] = vis[i ^ 1] = true;
		find(t[i],aim);
		if(f) {used[i] = used[i ^ 1] = true,cnt ++;return;}
	}
	return;
}
void dfss(int step,int lt,int maxn) {
	if(step == maxn) {
		LL sum = 1;cnt = 0;memset(used,0,sizeof(used));
		for(int i = 1;i <= step;i ++)	sum *= (pow(2,c[a[i]]) - 1),sum %= MOD;
		for(int i = 1;i <= step;i ++)
			for(int j = i + 1;j <= step;j ++) {
				f = 0;
				memset(vis,0,sizeof(vis));
				find(a[i],a[j]);
			}
		sum *= pow(2,m - cnt),sum %= MOD;
		ans += sum,ans %= MOD;
		return;
	}
	for(int i = lt;i + maxn - step - 1 <= q;i ++) {
		a[step + 1] = i;
		dfss(step + 1,i + 1,maxn);
	}
	return;
}
int main() {
	freopen("barrack.in","r",stdin);
	freopen("barrack.out","w",stdout);
	n = read(),m = read();
	for(int i = 1;i <= m;i ++) {
		int u = read(),v = read();
		add(u,v);
	}
	Tarjan(1);
	memset(vis,0,sizeof(vis));
	for(int i = 1;i <= k;i ++)	vis[bg[i]] = vis[bg[i] ^ 1] = true;
	for(int i = 1;i <= n;i ++)	if(!book[i])	q ++,dfs(i);
	for(int i = 1;i <= k;i ++)	ad(key[bgu[i]],key[to[bg[i]]]);
	for(int len = 1;len <= q;len ++)	dfss(0,1,len);
	printf("%lld\n",ans);
	return 0;
}