#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int mod=1e9+7;
int n,m;
const int N=3005;
int u[N],v[N];
bool camp[N];
int fa[N];
int find(int x){
	if(fa[x]==x) return fa[x];
	else return find(fa[x]);
}
ll ans=0;
ll qpow(int x){
	if(x==0) return 1;
	if(x==1) return 2;
	ll t=qpow(x/2);
	if(x%2==1) return ((t*t%mod)*2)%mod;
	else return (t*t%mod);
}
void sol(){
	int cnt=m;
	for(int i=1;i<=m;i++){
		for(int j=1;j<=n;j++) fa[j]=j;
		for(int j=1;j<=m;j++) if(j!=i){
			if(find(u[j])!=find(v[j]))
				fa[find(u[j])]=find(v[j]);
		}
		int tmp=0,dec=0;
		for(int j=1;j<=n;j++)
			if(camp[j]){
				if(tmp==0) tmp=find(j);
				else if(tmp!=find(j)){
					dec=1;
					break;
				}
			}
		cnt-=dec;
	}
	ans=(ans+qpow(cnt))%mod;
}
void dfs(int t,int cnt){
	if(t>n){
		if(cnt!=0) sol();
		return;
	}
	camp[t]=true;
	dfs(t+1,cnt+1);
	camp[t]=false;
	dfs(t+1,cnt);
}
int main(){
	freopen("barrack.in","r",stdin);
	freopen("barrack.out","w",stdout);
	scanf("%d%d",&n,&m);
	for(int i=1;i<=m;i++){
		scanf("%d%d",&u[i],&v[i]);
	}
	dfs(1,0);
	printf("%lld\n",ans);
	return 0;
}
