#include <bits/stdc++.h>
using namespace std;
const int N = 1e5+3;
int n,q;
int main()
{
	freopen("replace.in","r",stdin);
	freopen("replace.out","w",stdout);
	ios::sync_with_stdio(false);
	cin.tie(0);
	cin >> n >> q;
	string s1,s2,t1,t2;
	for(int i = 1;i <= n;i++)
		cin >> s1 >> s2;
	for(int j = 1;j <= q;j++)
		cin >> t1 >> t2;
	cout << 0;
	return 0;
}
