#include<bits/stdc++.h>
using namespace std;
int main()
{
	freopen("replace.in","r",stdin);
	freopen("replace.out","w",stdout);
	string a;
	int b,c,d,e,f;
	cin>>b>>c;
	for(d=0;d<2*(b+c);d++) cin>>a;
	for(d=0;d<c;d++) cout<<0<<endl;
	return 0;
}
