#include<bits/stdc++.h>
using namespace std;

#define int long long 

inline int read(){
	int x=0,f=1;char ch=getchar();
	while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();}
	while(ch>='0'&&ch<='9'){x=x*10+(ch-48);ch=getchar();}
	return x*f;
}	

const int maxn=1e6+10;
const int p=1e9+7;

int n,m;

struct node{
	int nxt,to;
}edge[maxn<<1];

int head[maxn],cnt;

void inint(int u,int v){
	edge[++cnt].nxt=head[u];
	edge[cnt].to=v;
	head[u]=cnt;
}

int vis[maxn],ans;
int w[1010][1010];

void clear(){
	for(int i=1;i<=n;i++) vis[i]=0;
}

void pre_fix(){
	for(int i=1;i<=n;i++){
		for(int j=head[i];j;j=edge[j].nxt){
			int v=edge[j].to;
			w[i][v]=1;
		}
	}
}

void dfs(int u){
	for(int i=head[u];i;i=edge[i].nxt){
		int v=edge[i].to;
		if(!vis[v]&&w[u][v]!=0){
			vis[v]=1;
			dfs(v);
		}
	}
}

struct nd{
	int u,v;
};
int from[maxn],to[maxn];
int jc[maxn];

signed main(){
	freopen("barrack.in","r",stdin);
	freopen("barrack.out","w",stdout);
	n=read(),m=read();
	for(int i=1;i<=m;i++){
		int u=read(),v=read();
		inint(u,v),inint(v,u);
		if(n<=16){
			w[u][v]=w[v][u]=1;
			from[i]=u,to[i]=v;
		}
	}
	if(n<=8){
		for(int i=1;i<(1<<n);i++){
			int res=0;
			for(int j=0;j<n;j++) if((i>>j)&1){
				res=j+1;
				break;
			} 
			for(int j=0;j<(1<<m);j++){
				pre_fix();
				clear();
				vis[res]=1;
				for(int k=1;k<=m;k++){
					if(!((j>>(k-1))&1)){
						int u=from[k],v=to[k];
						w[u][v]=w[v][u]=0;
					}
				}
				dfs(res);
				int f=0;
				for(int k=1;k<=n;k++){
					if(!vis[k]&&(i>>(k-1))&1){
						f=1;break;
					}
				}
				if(!f){
					ans++;
				}
			}
		}
		printf("%lld\n",ans);
	}
	else{
		jc[1]=2;jc[0]=1;
		for(int i=2;i<=n;i++) jc[i]=jc[i-1]*2%p;
		ans=(ans+jc[n-1]*n%p)%p;
		for(int i=2;i<=n;i++){
			ans=(ans+jc[n-i]*jc[i-2]%p*(n-i+1)%p)%p;
		}
		printf("%lld",ans);
	}
	return 0;
}