#include<bits/stdc++.h>
#define ll long long
const int mod=1e9+7;
using namespace std;
int n,m,head[1000005],cnt=1,tag[30],tot,vis[30];
ll ans,fac[2000005];
struct edge{
	int v,nxt,f;
}e[2000005];
void add(int u,int v){
	e[++cnt].f=1;e[cnt].v=v;e[cnt].nxt=head[u];head[u]=cnt;
}
void dfs(int u){
	vis[u]=1;
	for(int i=head[u];i;i=e[i].nxt){
		int v=e[i].v;
		if(vis[v]||e[i].f==0)continue;
		vis[v]=1;
		dfs(v);
	}
}
void solve(){
	int st;
	for(int i=1;i<=n;i++)if(tag[i]){st=i;break;}
	for(int i=2;i<=m+1;i++){
		e[i].f=e[i^1].f=0;
		memset(vis,0,sizeof(vis));
		dfs(st);
		int t=0;
		for(int j=1;j<=n;j++){
			if(tag[j]&&vis[j])t++;
		}
		if(t!=tot){
			ans=(ans+fac[m-1])%mod;
		}
		else ans=(ans+fac[m])%mod;
		e[i].f=e[i^1].f=1;
	}
}
signed main(){
	freopen("barrack.in","r",stdin);
	freopen("barrack.out","w",stdout);
	cin>>n>>m;
	fac[0]=1;
	for(int i=1;i<=m;i++)fac[i]=fac[i-1]*2%mod;
	for(int i=1,x,y;i<=m;i++){
		scanf("%d%d",&x,&y);
		add(x,y),add(y,x);
	}
	for(int i=1;i<=(1<<n);i++){
		memset(tag,0,sizeof(tag));
		tot=0;
		for(int j=1;(1<<j)<=i;j++){
			if((1<<j)&i){
				tag[j]=1,tot++;
			}
			solve();
		}
	}
	cout<<ans;
	return 0;
}