#include<bits/stdc++.h>

#define rd(x) x=read()

#define N 3005

using namespace std;

int n,m;
vector<int>e[N];
int vis[N];
const int mod=1e9+7;

inline void addEdge(int u,int v){e[u].push_back(v);}

inline int read()
{
	int 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;
}

void dfs(int u)
{
	for(int v:e[u])
	{
		if(vis[v])continue;
		vis[v]=1,dfs(v);
	}
}

int u[N],v[N];
int ans;

int main()
{
	freopen("barrack.in","r",stdin);
	freopen("barrack.out","w",stdout);
	rd(n),rd(m);
	for(int i=0;i<=m-1;i++)rd(u[i]),rd(v[i]),u[i]--,v[i]--;
	for(int i=1;i<=(1<<n)-1;i++)
	{
		vector<int>p;
		for(int ii=0;ii<=n-1;ii++)
			if(i>>ii&1)p.push_back(ii);
		for(int j=0;j<=(1<<m)-1;j++)
		{
			int flg=1;
			for(int jj=0;jj<=m-1;jj++)
				if(!(j>>jj&1))
				{
					for(int k=0;k<=n-1;k++)e[k].clear();
					for(int k=0;k<=m-1;k++)
						if(k!=jj)addEdge(u[k],v[k]),addEdge(v[k],u[k]);
					for(int k:p)
					{
						memset(vis,0,sizeof(vis)),vis[k]=1,dfs(k);
						for(int l:p)if(vis[l]==0){flg=0;break;}
						if(flg==0)break;
					}
					if(flg==0)break;
				}
			if(flg)ans=(ans+1)%mod;
		}
	}
	printf("%d\n",ans);
	return 0;
}
