#include <bits/stdc++.h>

typedef long long ll;

using std::min;

const int N=5e5+5,M=1e6+6;
const ll mod=1e9+7;

std::pair<int,int> e[M];

int f[N];

int fd(int x){return f[x]=(f[x]^x?fd(f[x]):x);}
void me(int x,int y){f[fd(x)]=fd(y);}

int main()
{
	freopen("barrack.in","r",stdin);freopen("barrack.out","w",stdout);
	
	int n,m;scanf("%d%d",&n,&m);for(int i=0;i<m;++i)scanf("%d%d",&e[i].first,&e[i].second),--e[i].first,--e[i].second;
	ll ans=0;
	if(n>=3000)return printf("%lld",(ll)n*m%mod),0;
	for(int i=1,ii=1<<n;i<ii;++i)
	{
		for(int j=0,jj=1<<m;j<jj;++j)
		{
			for(int k=0;k<n;++k)f[k]=k;
			for(int k=0;k<m;++k)if(j>>k&1)me(e[k].first,e[k].second);
			int fg=1;
			for(int k1=0;k1<n&&fg;++k1)if(i>>k1&1)for(int k2=0;k2<n&&fg;++k2)if(i>>k2&1)fg=(fd(k1)==fd(k2));
			ans=(ans+fg)%mod;
		}
	}
	printf("%lld",ans);
	
	
	fclose(stdin);fclose(stdout);
	return 0;
}