#include<bits/stdc++.h>
#define IOS ios::sync_with_stdio(0)
#define lowbit(x) (x&(-x))
#define int long long
using namespace std;
const int N=30,mod=1e9+7;
int n,m,f[N],ans,a[N];
pair<int,int> b[N];
int find(int x)
{
	if (f[x]==x) return x;
	return f[x]=find(f[x]);
}
signed main()
{
	freopen("barrack.in","r",stdin);
	freopen("barrack.out","w",stdout);
	cin>>n>>m;
	for (int i=1;i<=m;i++)
	{
		int u,v; cin>>u>>v; b[i]={u,v};
//		G[u].emplace_back(v); G[v].emplace_back(u);
	}
	for (int S=1;S<(1<<n);S++)
	{
		for (int i=1;i<=n;i++)
			if (S>>(i-1)&1) f[i]=i,a[i]=1; else f[i]=i,a[i]=0;
		int cnt=0;
		for (int i=1;i<=m;i++)
		{
			int x=b[i].first,y=b[i].second,fx=find(x),fy=find(y);
			if (!a[x]||!a[y])
			{
				cnt++;
				continue;
			}
			if (fx==fy) cnt++; else f[fx]=fy;
		}
		ans=(ans+(1<<cnt))%mod;
	}
	cout<<ans<<'\n';
}
