#include <bits/stdc++.h>

typedef long long int ll;
const ll mo = (ll)1000000007;

using std::vector;

int n, m;

class t1_7{
public:
	
	
	struct e_t{
		int u;
		int v;
	};
	
	e_t e[50];
	
	__int128 jc[100];
	ll c[100][100];
	ll f[100];
	
	ll ans = n;
	
	struct unf_t{
		int par;
		int depth;
	};
	unf_t unf[50];
	
	bool cho[50];
	
	int find(int x){
		if(-1 == unf[x].par){
			return x;
		}
		return unf[x].par = find(unf[x].par);
	}
	
	void add(int x, int y){
		x = find(x);
		y = find(y);
		if(x == y){
			return;
		}
		if(unf[x].depth > unf[y].depth){
			unf[y].par = x;
		}else if(unf[x].depth == unf[y].depth){
			unf[y].par = x;
			unf[x].depth++;
		}else{
			unf[x].par = y;
		}
	}
	
	inline t1_7(){
		int i;
		int u, v;
		
		for(i = 1; i <= m; i++){
			scanf("%d%d", &u, &v);
			e[i] = {u, v};
		}
		
		int j;
		
		jc[0] = 1;
		jc[1] = 1;
		for(i = 2; i <= n; i++){
			jc[i] = jc[i - 1] * i;
		}
		
		for(i = 1; i <= n; i++){
			for(j = 1; j <= i; j++){
				c[i][j] = jc[i] / jc[i - j] / jc[j] % mo;
			}
		}
		
		for(i = 1; i <= n; i++){
			f[i] = 0;
			for(j = 1; j <= i; j++){
				f[i] += c[i][j];
			}
		}
		
		//f[1] = c[1];
		//printf("%d ", f[1]);
		/*for(i = 2; i <= n; i++){
			f[i] = f[i - 1] + c[i];
			printf("%d ",f[i]);
		}*/
		
		/*for(i = 1; i <= n; i++){
			printf("%d ", f[i]);
		}
		printf("\n----------------\n");*/
		
		for(i = 1; i < (1 << m); i++){
			/*if(2 == i){
				printf("i = 2!\n");
			}*/
			for(j = 1; j <= n; j++){
				unf[j] = {-1, 1};
				cho[j] = false;
			}
			for(j = 1; j <= m; j++){
				if(i & (1 << (j - 1))){
					add(e[j].u, e[j].v);
					cho[e[j].u] = true;
					cho[e[j].v] = true;
				}
			}
			int k;
			bool b = true;
			int cnt = 0;
			for(j = 1; j <= m; j++){
				if(!(i & (1 << (j - 1)))){
					continue;
				}
				for(k = 1; k <= m; k++){
					if(i & (1 << (k - 1))){
						int a, c;
						a = find(e[k].u);
						c = find(e[j].u);
						if(a != c){
							b = false;
							break;
						}
					}
				}
				if(!b){
					break;
				}
			}
			if(b){
				for(j = 1; j <= n; j++){
					if(cho[j]){
						cnt++;
					}
				}
				/*printf("%d\n", i);
				printf("%lld\n", f[cnt]);
				printf("------------\n");*/
				ans += ((ll)1 << cnt) - 1;
				ans %= mo;
			}
		}
		
		printf("%lld", ans);
	}
};

int main(){
	freopen("barrack.in", "r", stdin);
	freopen("barrack.out", "w", stdout);
	
	scanf("%d%d", &n, &m);
	
	if(1 == n){
		printf("1\n");
		return 0;
	}
	
	if(n <= 16){
		t1_7 t;
	}
	
	return 0;
}

