/*
quan bu jia la!
*/
#include <bits/stdc++.h>
using namespace std;

#define il inline
#define ll long long
#define oup(x) wrt(x),ptc(' ')
#define oun(x) wrt(x),ptc('\n')
#define gtc getchar()
#define ptc putchar
#define rd read()
#define rdl readl()
il int read(){int x=0;bool f=0;char c=gtc;while(c<'0'||c>'9'){if(c=='-')f=1;c=gtc;}while(c>='0'&&c<='9'){x=(x<<1)+(x<<3)+(c^48);c=gtc;}return f?-x:x;}
il ll readl(){ll x=0;bool f=0;char c=gtc;while(c<'0'||c>'9'){if(c=='-')f=1;c=gtc;}while(c>='0'&&c<='9'){x=(x<<1)+(x<<3)+(c^48);c=gtc;}	return f?-x:x;}
il void wt(ll x){if(x>10)wt(x/10);ptc(x%10+48);}
il void wrt(ll x){if(x<0)ptc('-'),wt(-x);else wt(x);}

const int mod = 1000000007;

namespace sol1{

const int M = 30;
const int N = 20;
int ui[M], vi[M];
bool vis[N];

ll kkknb[N],orzkkk[N];
il void init(int n){
	kkknb[1] = 1,orzkkk[1] = 1;
	for(int i = 2; i <= n; i++) kkknb[i] = kkknb[i - 1] * i % mod, orzkkk[i] = 1;
	for(int i = 2; i <= n; i++)
		for(int j = 1; j < i; j++){
			orzkkk[i] = (orzkkk[i] + kkknb[i] / kkknb[j] / kkknb[i - j]) % mod; 
		}
}

ll ans = 0;
il void check(int n, int k, int m){
	int sum = 0;
	memset(vis, 0, sizeof(vis));
	for(int i = 0; i < m; i++)
		if(k & (1 << i)){
			if(!vis[ui[i + 1]]) vis[ui[i + 1]] = 1, sum++;
			if(!vis[vi[i + 1]]) vis[vi[i + 1]] = 1, sum++;
		}
		
	oup(k),oup(sum),oun(orzkkk[sum]);
	
	ans = (ans + orzkkk[sum]) % mod;
}

il void work(int n, int m){
	
	for(int i = 1; i <= m; i++)
		ui[i] = rd, vi[i] = rd;
		
	init(n);
	for(int i = 1; i <= n; i++) oup(orzkkk[i]);ptc('\n');
//	exit(0);
	
	ans = n;
	for(int i = 1; i < 1 << (m); ++i)
		check(n, i, m);
	
	oun(ans);
}

}


#define FL barrack
int main(){

	freopen(FL".in","r",stdin);
	freopen(FL".out","w",stdout);
	
	int n = rd, m = rd;
	
	if(n <= 16 && m <= 25) sol1::work(n, m);
	
	
	return 0;
}
/*
2 1
2 1 2

*/
/*
4 4
2 1 2
3 2 3
4 3 1
5 1 4

*/
