#include<bits/stdc++.h>
using namespace std;
const int mm=1000010,md=1e9+7;
int m,n;
bool v[20],us[20];
long long pw[110],ans=0;

int head[mm],nxt[mm],to[mm],tot,f1,f2;
void jb(int x,int y){
	nxt[++tot]=head[x];
	to[tot]=y;
	head[x]=tot;
}

void dfs(int x){//cout<<x<<endl;
	v[x]=1;
	for(int i=head[x],j;i!=0;i=nxt[i]){
		j=to[i];
		if(!v[j]&&i!=f1&&i!=f2){
			dfs(j);
		}
	}
}

int main(){
	freopen("barrack.in","r",stdin);
	freopen("barrack.out","w",stdout);
	cin>>n>>m;
	int i,j,k;
	for(i=1;i<=m;i++){
		scanf("%d%d",&j,&k);
		jb(j,k);jb(k,j);
	}
	for(i=1,pw[0]=1;i<=100;i++)pw[i]=pw[i-1]*2%md;
	int mxn=pw[n],nd,nb;
	for(i=1;i<mxn;i++){
		k=i;nd=0,nb=m;
		for(j=1;k;j++,k/=2){
			if(k&1)us[j]=1,nd++;
			else us[j]=0;
		}
		for(j=1;j<=m;j++){
			f1=j*2;f2=j*2-1;
			memset(v,0,sizeof v);
			for(k=1;k<=n;k++)if(us[k]){//cout<<"*"<<endl;
				dfs(k);break;
			}
			for(k=1;k<=n;k++)if(us[k]&&!v[k]){
				nb--;break;
			}
		}
//		cout<<nb<<' '<<nd<<endl;
		ans=(ans+pw[nb])%md;
	}
	cout<<ans<<endl;
	
	return 0;
}
