#include <bits/stdc++.h>
namespace Qiaoqia { 
constexpr int N = 32, P = 10'0000'0007;

int n, m, fa[N], sz[N], e[N][2], ans, pw[N];

int add(int x, int y) { x += y; if (x >= P) x -= P; return x; }

int find(int x) { return x == fa[x] ? x : (fa[x] = find(fa[x]));  }

void merge(int x, int y) {
	x = find(x), y = find(y);
	if (x == y) return;
	fa[x] = y, sz[y] += sz[x];
}

void main() {
	std::cin >> n >> m;
	pw[0] = 1;
	for (int i = 1; i <= n; i++) pw[i] = 2 * pw[i - 1];
	for (int i = 0; i < m; i++) 
		std::cin >> e[i][0] >> e[i][1];
	for (int S = 0; S < (1 << m); S++) {
		for (int i = 1; i <= n; i++) fa[i] = i, sz[i] = 1;
		for (int i = 0; i < m; i++)
			if ((S >> i) & 1) merge(e[i][0], e[i][1]);
		for (int i = 1; i <= n; i++)
			if (find(i) == i) ans = add(ans, add(pw[sz[i]], P - 1));
	}
	std::cout << ans;
}
}
void _() { std::ios::sync_with_stdio(false), std::cin.tie(nullptr); }
int main() { void IO(); IO(); _(); Qiaoqia::main(); }
void IO() {
	freopen("barrack.in", "r", stdin);
	freopen("barrack.out", "w", stdout);
}

