#include<bits/stdc++.h>
using namespace std;
int sum1[5000005],num1[5000005],n,q;
string a,b;
signed main(){
	freopen("replace.in","r",stdin);
	freopen("replace.out","w",stdout);
	cin>>n>>q;
	for(int i=1;i<=n;i++){
		cin>>a>>b;
		a.size();
		for(int j=0;j<=)
	}
	for(int i=1;i<=q;i++){
		cin>>a>>b;
	}
	fclose(stdin);
	fclose(stdout);
	return 0;
}
