#include<bits/stdc++.h>
using namespace std;
const int P=1e9+7;
int n,m,u[1000005],v[1000005],ma[1000005],mark[1000005],sum,ans;
int tot,to[2000005],nxt[2000005],id[2000005],head[500005];
void add(int x,int y,int z){
	tot++;
	to[tot]=y;
	nxt[tot]=head[x];
	id[tot]=z;
	head[x]=tot;
}
void dfs(int x,int fa){
	sum|=(1<<(x-1));
	int i,y;
	mark[x]=1;
	for(i=head[x];i;i=nxt[i]){
		y=to[i];
		if(y==fa||ma[id[i]]||mark[y]==1)continue;
		dfs(y,x);
	}
}
int main(){
	freopen("barrack.in","r",stdin);
	freopen("barrack.out","w",stdout);
	int i,j,k;
	scanf("%d%d",&n,&m);
	for(i=1;i<=m;i++){
		scanf("%d%d",&u[i],&v[i]);
		add(u[i],v[i],i);
		add(v[i],u[i],i);
	}
	for(i=1;i<(1<<n);i++){
		for(j=0;j<(1<<m);j++){
			int f=1,x=log2(i&-i)+1;
			for(k=1;k<=m;k++){
				if(j&(1<<(k-1)))continue;
				ma[k]=1;
				sum=0;
				memset(mark,0,sizeof(mark));
				dfs(x,0);
				ma[k]=0;
				if((sum&i)!=i){
					f=0;
					break;
				}
			}
			ans=(ans+f)%P;
		}
	}
	printf("%d",ans);
	return 0;
}