#include<bits/stdc++.h>
#define N 500005
const int mod=1e9+7;
using namespace std;
int n,m,fi[N],cnt,o1,o2;
long long ans,er[N];
struct p{
	int ne,to;
}l[N<<1];
inline int read(){
	int res=0;char ch=getchar();int f=ch=='-'?-1:1;
	while(ch<'0'||ch>'9')ch=getchar(),f=ch=='-'?-1:f;
	while(ch>='0'&&ch<='9')res=res*10+ch-'0',ch=getchar();
	return res*f;
}
bool v1[N],v2[N],f[105];
inline void add(int x,int y){
	l[++cnt].ne=fi[x];
	l[cnt].to=y;
	fi[x]=cnt;
}
inline void bfs(int x){
	memset(f,0,sizeof(f));
	queue<int>q;q.push(x),f[x]=1;
	while(!q.empty()){
		int u=q.front();q.pop();
		for(int i=fi[u];i;i=l[i].ne){
			if(!v2[i+1>>1])continue;
			int v=l[i].to;
			if(!f[v])f[v]=1,q.push(v);
		}
	}
}
inline bool check(){
	for(int i=1;i<=n;++i)if(v1[i]){
		bfs(i);
		for(int j=1;j<=n;++j)if(v1[j]&&!f[j])return 0;
		return 1;
	}
	return 0;
}
inline void dfs2(int k){
	if(k==m+1){ans+=check();return;}
	v2[k]=0,dfs2(k+1);
	v2[k]=1,dfs2(k+1);
}
inline void dfs1(int k){
	if(k==n+1){dfs2(1);return;}
	v1[k]=0,dfs1(k+1);
	v1[k]=1,dfs1(k+1);
}
int main(){
	freopen("barrack.in","r",stdin);
	freopen("barrack.out","w",stdout);
	n=read(),m=read();
	for(int i=1;i<=m;++i)o1=read(),o2=read(),add(o1,o2),add(o2,o1);
	if(m==n-1){
		er[0]=1;
		for(int i=1;i<=n;++i)er[i]=er[i-1]*2%mod;
		for(int i=n;i;--i)ans+=i*er[i-1]%mod*er[max(0,n-i-1)],ans%=mod;
		printf("%lld",ans);
		return 0;
	}
	dfs1(1);
	printf("%lld",ans);
	return 0;
}
