#include<bits/stdc++.h>
using namespace std;
#define int long long
#define fo(i,a,b) for(int i=a;i<=b;i++)
#define fr(i,a,b) for(int i=a;i>=b;i--)
#define wt(x) write(x),puts("")
inline int read(){
	int x=0,k=1;
	char ch=getchar();
	while(ch<'0'||ch>'9'){
		if(ch=='-') k=-1;
		ch=getchar();
	}
	while(ch>='0'&&ch<='9'){
		x=(x<<1)+(x<<3)+ch-'0';
		ch=getchar();
	}
	return x*k;
}
void write(int x){
	if(x<0){
		putchar('-');
		x=-x;
	}
	if(x>9){
		write(x/10);
	}
	putchar(x%10+'0');
	return ;
}
const int N=2e6+7,mod=1e9+7;
int n,m,tot,cnt,ans,k;
int fa[N],vis[N],cf[N];
struct edge{
	int u,v;
}e[N];
int find(int x){
	if(fa[x]==x) return x;
	return fa[x]=find(fa[x]);
}
void dfs(int pos){
	if(pos==n){
		int fl=0;
		fo(i,1,n){
			if(vis[i]) fl=1;
		}
		if(!fl) return ;
		int p=0,num=0;
		fo(j,1,m){
			fo(i,1,n) fa[i]=i;
			fo(i,1,m){
				if(i==j) continue;
				int x=find(e[i].u),y=find(e[i].v);
				if(x==y) continue;
				fa[x]=y;
				p++;
				if(p==n-1) break;
			}
			if(p==n-1) continue;
			int l=0,fl1=0;
			fo(i,1,n){
				if(vis[i]){
					if(!l) l=find(i);
					else{
						if(l!=find(i)){
							fl1=1;
							break;
						}
					}
				}
			}
			if(fl1) num++;
		}
		ans=(ans+cf[m-num])%mod;
		return ;
	}
	dfs(pos+1);
	vis[pos+1]=1;
	dfs(pos+1);
	vis[pos+1]=0;
}
signed main(){
	freopen("barrack.in","r",stdin);
	freopen("barrack.out","w",stdout);
	n=read();m=read();
	cf[0]=1;
	fo(i,1,m) cf[i]=cf[i-1]*2%mod;
	fo(i,1,m){
		e[i]={read(),read()};
	}
	dfs(0);
	wt(ans);
}	
