#include<bits/stdc++.h>
using namespace std;
const int N=1e6+5,mod=1e9+7;
int n,m,eu[N],ev[N],f[N],pw[N],res,ans;
int find(int x){
	return x==f[x]?x:f[x]=find(f[x]);
}
bool ok(int s){
	for(int i=1;i<=n;i++)
		for(int j=1;j<=n;j++)
			if((s>>(i-1)&1)&&(s>>(j-1)&1)&&find(i)!=find(j)) return 0;
	return 1;
}
signed main(){
	freopen("barrack.in","r",stdin);
	freopen("barrack.out","w",stdout);
	scanf("%d%d",&n,&m),pw[0]=1;
	for(int i=1;i<=m;i++)
		scanf("%d%d",&eu[i],&ev[i]),pw[i]=2ll*pw[i-1]%mod;
	if(n>16){
		for(int i=1;i<=n;i++)
			res=(res+1ll*pw[m-(i-1)]*pw[max(0,i-2)]%mod*(n-i+1)%mod)%mod;
		printf("%d\n",res),exit(0);
	}
	for(int s=1;s<(1<<n);s++){
		int cnt=0;
		for(int x=1;x<=m;x++){
			for(int i=1;i<=n;i++) f[i]=i;
			for(int i=1;i<=m;i++)
				if(i!=x) f[find(eu[i])]=find(ev[i]);
			cnt+=ok(s);
		}
		ans=(ans+pw[cnt])%mod;
	}
	printf("%d\n",ans);
	return 0;
}