#include<bits/stdc++.h>
using namespace std;
const long long MOD=998244353;
long long n,m,c[505],q;
string s1,s2;
int f;
int main(){
	freopen("replace.in","r",stdin);
	freopen("replace.out","w",stdout);
	cin>>n>>q;
	for(int i=1;i<=n;i++){
		cin>>s1>>s2;
	}
	while(q--){
		cout<<0<<"\n";
	}
	return 0;
} 

