#include<bits/stdc++.h>
#define ll long long
#define fi first
#define se second
#define par pair<int,int>
#define pb push_back
#define mkp make_pair
using namespace std;
const int M=5e5+5,mod=1e9+7;
ll RD(){
	ll x=0,f=1;char c=getchar();
	while(c<'0'||c>'9'){if(c=='-')f=-1;c=getchar();}
	while(c>='0'&&c<='9'){x=(x<<3)+(x<<1)+c-'0';c=getchar();}
	return x*f;
}
int n,m;
struct edge{int to,nx,id;}e[M<<1];int h[M],e_;
void add_e(int u,int v,int i){e[++e_]=(edge){v,h[u],i};h[u]=e_;}
ll ksm(ll a,ll r){
	ll res=1;
	while(r)
	{
		if(r&1)res=res*a%mod;
		a=a*a%mod;r>>=1;
	}return res;
}
int dfn[M],low[M],clo;
stack<int>st;bool inst[M];
int col[M],tcol;ll sum[M],es[M];
void tarjan(int u,int fa){
	dfn[u]=low[u]=++clo;
	st.push(u),inst[u]=1;
	for(int i=h[u];i;i=e[i].nx)
	{
		int v=e[i].to;
		if(v==fa)continue;
		if(!dfn[v])
		{
			tarjan(v,u);
			low[u]=min(low[u],low[v]);
		}else if(inst[v])low[u]=min(low[u],dfn[v]);
	}
	if(dfn[u]==low[u])
	{
		int x;tcol++;
		do{
			x=st.top();st.pop();
			col[x]=tcol;inst[x]=0;sum[tcol]++;
		}while(x!=u);
	}
}
int U[M],V[M];
ll f[M][3];ll sp[M],se[M];
void dfs(int u,int fa){
	f[u][0]=ksm(2,es[u]+1);
	f[u][1]=f[u][2]=ksm(2,es[u]+sum[u]);
	for(int i=h[u];i;i=e[i].nx)
	{
		int v=e[i].to;if(v==fa)continue;dfs(v,u);
		
		int t0=f[u][0],t1=f[u][1],t2=f[u][2];
		
		f[u][0]=t0*ksm(2,se[v]+1)%mod;
		
		f[u][1]=t0*((f[v][1]+f[v][2])%mod)%mod;
		
		f[u][2]=(t0*f[v][2]%mod+t2*f[v][0]%mod+t2*f[v][2]%mod)%mod;
		
		sp[u]+=sp[v],se[u]+=se[v]+1;
	}
	se[u]+=es[u],sp[u]+=sum[u];
}

void sub2(){
	for(int i=1;i<=n;i++)if(!dfn[i])tarjan(i,0);
	memset(h,0,sizeof(h)),e_=0;
	for(int i=1;i<=m;i++)
	{
		int u=col[U[i]],v=col[V[i]];
		if(v^u)add_e(u,v,0),add_e(v,u,0);
	}
	dfs(col[1],0);
	printf("%lld\n",(f[col[1]][1]-f[col[1]][0]+mod+1)%mod);
}

bool ex[M];int ban;
bitset<15>vis;
bool bfs(int s){
	vis.reset();int ls=0;
	for(int i=1;i<=n;i++)if(ex[i])ls++;
	if(ls==1)return 1;
	queue<int>Q;while(!Q.empty())Q.pop();
	Q.push(s);ls--;vis[s]=1;
	while(!Q.empty())
	{
		int u=Q.front();Q.pop();
		for(int i=h[u];i;i=e[i].nx)
		{
			int v=e[i].to;if(vis[v]||ban==e[i].id)continue;
			vis[v]=1;
			if(ex[v])ls--;
			if(!ls)return 1;
			Q.push(v);
		}
	}return 0;
}
void sub1(){
	int ans=0;
	int Sn=(1<<n)-1,Sm=(1<<m)-1;
	for(int s=1;s<=Sn;s++)
	{
		for(int i=0;i<n;i++)ex[i+1]=(s&(1<<i));
		for(int se=0;se<=Sm;se++)
		{
			int fl=1;
			for(int i=0;i<m&&fl;i++)
			{
				if((se&(1<<i)))continue;
				ban=i+1;
				for(int j=1;j<=n;j++)
				{
					if(ex[j]){fl&=bfs(j);break;}
				}
			}ans+=fl;
		}
	}
	printf("%d\n",ans);
}

int main(){
	
	freopen("barrack.in","r",stdin);
	freopen("barrack.out","w",stdout);
	
	n=RD(),m=RD();
	for(int i=1;i<=m;i++)
	{
		int u=RD(),v=RD();U[i]=u,V[i]=v;
		add_e(u,v,i),add_e(v,u,i);
	}
	if(n+m<=25)return sub1(),0;
	return sub2(),0;
	return 0;
}