#include<iostream>
#include<cstdio>
#define int long long
using namespace std;
const int p=1e9+7;
int n,m;
namespace Q1
{
	const int N=30;
	int P[N];
	int e[N][N];
	int c[N],cnt;
	void dfs(int x)
	{
		if(c[x]) return;c[x]=cnt;
		for(int i=1;i<=n;i++) if(e[x][i]) dfs(i);
	}
	void main()
	{
		P[0]=1;for(int i=1;i<N;i++) P[i]=P[i-1]*2%p;
		for(int i=1,x,y;i<=m;i++)
			scanf("%lld%lld",&x,&y),e[x][y]=e[y][x]=1;
		int ans=0;
		for(int S=1;S<(1<<n);S++)
		{
			int sum=0;
			for(int i=1;i<=n;i++) for(int j=i+1;j<=n;j++) if(e[i][j])
			{
				e[i][j]=e[j][i]=0;
				for(int k=1;k<=n;k++) c[k]=0;cnt=0;
				for(int k=1;k<=n;k++) if(!c[k]) cnt++,dfs(k);
				int t=0,fl=1;
				for(int k=1;k<=n;k++) if(S&(1<<k-1)) t=c[k];
				for(int k=1;k<=n;k++) if((S&(1<<k-1))&&c[k]!=t) fl=0;
				if(!fl) sum++;
				e[i][j]=e[j][i]=1;
			}
			ans=(ans+P[m-sum])%p;
		}
		printf("%lld",ans);
	}
}
namespace Q2
{
	const int N=1e6+10;
	int P[N];
	void main()
	{
		P[0]=1;for(int i=1;i<N;i++) P[i]=P[i-1]*2%p;
		int ans=0;
		for(int i=2;i<=n;i++)
			ans=(ans+P[n-i]*(n-i+1)%p*P[i-2]%p)%p;
		ans=(ans+n*P[n-1])%p;
		printf("%lld",ans);
	}
}
signed main()
{
	freopen("barrack.in","r",stdin);
	freopen("barrack.out","w",stdout);
	scanf("%lld%lld",&n,&m);
	if(n<=16&&m<=25) Q1::main(),exit(0);
	else Q2::main(),exit(0);
	return 0;
}
