#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn=500005,maxm=1000005,P=1000000007;
int n,m,ma[50][50];
int tot,head[maxm<<1],nxt[maxm<<1],tail[maxm<<1],from[maxm<<1];
ll ans=0;
int fa[maxn],num[maxn];
int getfa(int x){
	return fa[x]==x?x:fa[x]=getfa(fa[x]);
}
void join(int x,int y){
	int xx=getfa(x),yy=getfa(y);
	if(xx!=yy) fa[xx]=yy;
}
void addedge(int u,int v){
	nxt[++tot]=head[u];
	head[u]=tot;
	tail[tot]=v;
	from[tot]=u;
}
void dfs(int x){
	if(x==2*m+1){
		for(int i=1;i<=n;i++) fa[i]=i,num[i]=0;
		for(int i=1;i<=n;i++){
			for(int j=1;j<=n;j++){
				if(ma[i][j]) join(i,j);
			}
		}
		for(int i=1;i<=n;i++){
			num[getfa(i)]++;
		}
		for(int i=1;i<=n;i++){
			if(fa[i]==i){
				ans+=(1<<num[i])-1;
				ans%=P;
			}
		}
		return;
	}
	int u=from[x],v=tail[x];
	if(u<v){
		dfs(x+1);
		return;
	}
	ma[u][v]=ma[v][u]=0;
	dfs(x+1);
	ma[u][v]=ma[v][u]=1;
	dfs(x+1);
}
int main(){
	freopen("barrack.in","r",stdin);
	freopen("barrack.out","w",stdout);
	scanf("%d%d",&n,&m);
	if(n<=8){
		for(int i=1;i<=m;i++){
			int x,y;
			scanf("%d%d",&x,&y);
			addedge(x,y);addedge(y,x);
			ma[x][y]=ma[y][x]=1;
		}
		ans=0;
		dfs(1);
		printf("%d\n",ans);
	}
	return 0;
}
