#include <bits/stdc++.h>

using namespace std;

namespace IO{
    template <typename T> void read(T &x){
        bool f = false;
        char c;
        x = 0;
        while (!isdigit(c = getchar())) if (c == '-') f = true;
        while (isdigit(c)) x = 10 * x + c - '0', c = getchar();
        if (f) x = -x;
    }
    template <typename T, typename... Args> void read(T &x, Args&... args){read(x); read(args...);}
} using namespace IO;

const int N = 105, M = 1e6 + 10, mod = 1e9 + 7;

bool done[N];
int n, m;
int x[M], y[M], g[N][N];
queue<int> q;

bool bfs(int u, int S){
    for (int i = 1; i <= n; i++) done[i] = false;
    done[u] = true;
    q.emplace(u);
    while (!q.empty()){
        int u = q.front();
        q.pop();
        for (int v = 1; v <= n; v++)
            if (g[u][v] and !done[v]){
                done[v] = true;
                q.emplace(v);
            }
    } for (int i = 1; i <= n; i++)
        if (S & 1 << (i - 1) and !done[i])
            return false;
    return true;
}

int main(){
	
	freopen("barrack.in", "r", stdin);
	freopen("barrack.out", "w", stdout);

    read(n, m);
    for (int i = 1; i <= m; i++) read(x[i], y[i]), g[x[i]][y[i]] = g[y[i]][x[i]] = 1;

    int ans = 0;
    for (int i = 1; i < 1 << n; i++){
        int u = 0;
        for (int j = 0; j < n; j++)
            if (i & 1 << j)
                u = j + 1;
        for (int j = 0; j < 1 << m; j++){
            bool f = true;
            for (int k = 0; k < m; k++){
                if (!(j & 1 << k)){
                    g[x[k + 1]][y[k + 1]] = g[y[k + 1]][x[k + 1]] = 0;
                    f &= bfs(u, i);
                    g[x[k + 1]][y[k + 1]] = g[y[k + 1]][x[k + 1]] = 1;
                }
            } (ans += f) %= mod;
        }       
        
    } printf("%d\n", ans);
        
    return 0;
}
