#include<bits/stdc++.h>
using namespace std;
vector<int>mp[30];
const int maxn=1e9+7;
bool kind[30];
int mst=0;
int able[30][30],u[30],v[30];
int n,m;
void add(){
    int i=1;
    kind[i]=!kind[i];
    while(!kind[i]){
        i++;
        kind[i]=!kind[i];
    }
}
queue<int>q;
bool vis[30];
void bfs(int now){
    if(vis[now])return;
    vis[now]=1;
    int len=mp[now].size();
    for(int i=0;i<len;i++){
        if(able[now][mp[now][i]])continue;
        q.push(mp[now][i]);
    }
    while(!q.empty()){
        int nxt=q.front();
        q.pop();
        bfs(nxt);
    }
    return;
}
bool check(int civ){
    for(int i=0;i<30;i++){
        vis[i]=0;
    }
    bfs(civ);
    for(int i=1;i<=n;i++){
        if(kind[i]&&(!vis[i]))return true;
    }
    return false;
}
int pask[30];
int main(){
    freopen("barrack.in","r",stdin);
    freopen("barrack.out","w",stdout);
    cin>>n>>m;
    kind[1]=1;
    pask[1]=1;
    pask[2]=1;
    for(int i=1;i<=m;i++){
        cin>>u[i]>>v[i];
        mp[u[i]].push_back(v[i]);
        mp[v[i]].push_back(u[i]);
    }
    long long ans=0;
    for(;!kind[n+1];add()){
            mst=0;
            int civ;
        for(int i=1;i<=n;i++){
            if(kind[i]){
                civ=i;
                break;
            }
        }
        for(int i=1;i<=m;i++){
            able[u[i]][v[i]]=1;
            able[v[i]][u[i]]=1;
            if(check(civ))mst++;
            able[u[i]][v[i]]=0;
            able[v[i]][u[i]]=0;
        }
        int awsd=m-mst;
        ans+=pow(2,awsd);
        ans%=maxn;
    }
    cout<<ans<<endl;
    return 0;
}
