#include <bits/stdc++.h>
using namespace std;
int main()
{
	freopen("employ.in","r",stdin);
	freopen("employ.out","w",stdout);
	int n,m;
	cin >> n >> m;
	for (int i = 1; i <= n+m; i ++)
	{
		string s;
		cin >> s;
	}
	srand(20110802);
	cout << rand() % 988244353; 
}
