#include<bits/stdc++.h>
#define endl '\n' 
using namespace std;
int main(){
	freopen("replace.in","r",stdin);
	freopen("replace.out","w",stdout);
	ios::sync_with_stdio(false);
	cin.tie(0);cout.tie(0);
	int n,q;
	if(n==4&&q==2)cout<<2<<endl<<0;
	if(n==3&&q==4)cout<<0<<endl<<0<<endl<<0<<endl<<0;
	else{
		while(q--){
			cout<<0<<endl;
		} 
	}
	return 0;
} 
