#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define N 1000050
const int mod=1e9+7;
int n,m,pw2[N];
vector<pair<int,int> > E;
class Union_Set{
public:
	vector<int> f;
	Union_Set(int n){
		f.resize(n+1);
		for(int i=1;i<=n;++i){
			f[i]=i;
		}
	}
	int getf(int x){
		return f[x]==x?x:f[x]=getf(f[x]);
	}
	void Merge(int x,int y){
		int fx=getf(x),fy=getf(y);
		f[fy]=fx;
	}
};
int calc(int mk){
	vector<bool> vis(n+1);
	vector<int> A;
	for(int i=1;i<=n;++i){
		if(mk>>(i-1)&1){
			vis[i]=1;
			A.push_back(i);
		}
	}
	int rem=E.size();
	for(int i=0;i<(int)E.size();++i){
		Union_Set S(n);
		for(int j=0;j<(int)E.size();++j){
			if(i==j)continue;
			S.Merge(E[j].first,E[j].second);
		}
		bool ok=true;
		for(int j=1;j<(int)A.size();++j){
			if(S.getf(A[j])!=S.getf(A[0])){
				ok=false;
				break;
			}
		}
		rem-=!ok;
	}
	return pw2[rem];
}
void Baoli(){
	int ans=0;
	for(int i=1;i<(1<<n);++i){
		ans=(ans+calc(i))%mod;
	}
	cout<<ans<<'\n';
}
int main(){
	freopen("barrack.in","r",stdin);
	freopen("barrack.out","w",stdout);
	ios::sync_with_stdio(false);
	cin.tie(0);
	cin>>n>>m;
	for(int i=1;i<=m;++i){
		int u,v;
		cin>>u>>v;
		E.emplace_back(u,v);
	}
	pw2[0]=1;
	for(int i=1;i<=max(n,m);++i){
		pw2[i]=(pw2[i-1]<<1)%mod;
	}
	if(n<=16&&m<=25){
		Baoli();
		return 0;
	}
	int ans=1LL*n*pw2[m]%mod;
	for(int i=2;i<=n;++i){
		ans=(ans+1LL*pw2[i-2+(n-i)]*(n-i+1)%mod)%mod;
	}
	cout<<ans<<'\n';
	return 0;
}
