#include<bits/stdc++.h>
using namespace std;
string a;
int main(){
	freopen("replace.in","r",stdin);
	freopen("replace.out","w",stdout);
	ios::sync_with_stdio(0);
	long long n,q;
	cin>>n>>q;
	for(int i=1;i<=n;i++){
		cin>>a;
	}for(int i=1;i<=q;i++){
		cin>>a;
		cout<<0;
	}
	fclose(stdin);
	fclose(stdout);
	return 0;
}
