#include<bits/stdc++.h>
#define fori(i,a,b) for(i=a;i<=b;i++)
#define ford(i,a,b) for(i=a;i>=b;i--)
typedef long long ll;
typedef double db;
using namespace std;
const int Mod=1e9+7;
const int N=53;
ll w[N],x,y,vis[N],ans,dfn[N],low[N],to[N],nxt[N],len,las[N],num,tag[N];
ll n,m,i,cnt;
ll sc(ll xx)
{
	ll i,num;
	vis[xx]=true;
	num=1;
	for(i=las[xx];i;i=nxt[i])
	if (w[i]==false&&!vis[to[i]])
	{
		num+=sc(to[i]);
	}
	return num;
}
ll qpow(ll x,ll y){
	if (y==0) return 1;
	if (y==1) return x;
	ll w;
	w=qpow(x,y/2);
	w=w*w%Mod;
	if (y%2==0) return w;
	else return w*x%Mod;
}
void solve(ll x)
{
	ll i,val;
	memset(w,0,sizeof(w));
	val=0;
	for(i=2;i<=2*m+1;i+=2)
	if (tag[i])
	{
		val++;
		if (x&(1<<(val-1))) 
		{
			w[i]=true;
			w[i^1]=true;
		}
	}
	memset(vis,0,sizeof(vis));
	fori(i,1,n)
	if (!vis[i]) 
	{
		ans+=qpow(2,sc(i))-1;
		ans%=Mod;
	}
}
void add(ll x,ll y)
{
	to[++len]=y;
	nxt[len]=las[x];
	las[x]=len;
}
void tarjan(ll x,ll las_e)
{
	low[x]=dfn[x]=++num;
	ll i,y;
	 for (i=las[x];i;i=nxt[i])
	 {
	 	y=to[i];
	 	if (!dfn[y])
	 	{
	 		tarjan(y,i);
	 		low[x]=min(low[x],low[y]);
	 		if (low[y]>dfn[x])
	 		{
	 			if (tag[i]!=true){
	 				tag[i]=true;
	 			tag[i^1]=true;
	 			cnt++;
			    }
			 }
		 }
	 	else if (i!=(las_e^1)) low[x]=min(low[x],dfn[y]);
	 } 
}
int main()
{
	freopen("barrack.in","r",stdin); freopen("barrack.out","w",stdout);
	cin>>n>>m;
	len=1;
	fori(i,1,m)
	{
		scanf("%lld%lld",&x,&y);
		add(x,y);
		add(y,x);
	}
	fori(i,1,n)
	if (!dfn[i]) tarjan(i,0);
	fori(i,0,((1<<cnt)-1))
	solve(i);
	cout<<ans*qpow(2,m-cnt)%Mod<<endl;
}