#include<bits/stdc++.h>
using namespace std;
long long c[10000],d[10000],u[10000],v[10000],fa[10000],n,m,mod,o,p,y[100][100],l[10000];
vector <long long> a[10000];
bool b[1000][1000],bo;
long long ans;
int find(int x)
{
	if (fa[x]==x) return fa[x];
	fa[x]=find(fa[x]);
	return fa[x];
}
void dfs1(int x,int z,int j)
{
	l[z]=x;
	if (x==j&&z!=1)
	{
		for (int i=2;i<=z;i++)
		{
			o=find(1);p=find(l[i]);
			fa[o]=p;
		}
		bo=1;
		return ;
	}
	for (int i=0;i<a[x].size();i++)
	{
		int y=a[x][i];
		if (b[x][y]==0)
		{
			b[x][y]=1;b[y][x]=1;
			dfs1(y,z+1,j);
			if (bo) return ;
		}
	}
}
void dfs(int x)
{
	if (x==m+1)
	{
		for (int i=1;i<=n;i++)
		 d[i]=0;
		for (int i=1;i<=n;i++)
		 d[find(i)]++;
		long long e=0;
		for (int i=1;i<=n;i++)
		{
			e=(e+(c[d[i]]-1))%mod;
			ans=(ans+(c[d[i]]-1))%mod;
		}
		return ;
	}
	for (int i=1;i<=n;i++)
	 y[x][i]=fa[i];
	dfs(x+1);
	o=find(u[x]);p=find(v[x]);
	fa[o]=p;
	dfs(x+1);
	for (int i=1;i<=n;i++)
	 fa[i]=y[x][i];
}
int main()
{
	freopen("barrack.in","r",stdin);
	freopen("barrack.out","w",stdout);
	mod=1e9+7;
	cin>>n>>m;
	c[0]=1;
	for (int i=1;i<=n;i++)
	 c[i]=c[i-1]*2%mod;
	for (int i=1;i<=n;i++)
	 fa[i]=i;
	for (int i=1;i<=m;i++)
	{
		cin>>u[i]>>v[i];
		a[u[i]].push_back(v[i]);
		a[v[i]].push_back(u[i]);
	}
	for (int i=1;i<=n;i++)
	{
		for (int j=1;j<=n;j++)
		 for (int k=1;k<=n;k++)
		  b[j][k]=0;
		dfs1(i,1,i);
	}
	dfs(1);
	cout<<ans;
}