#include<iostream>
#include<cstdio>
#include<map>
#include<sstream>
#include<cstring>
#include<istream>
using namespace std;
map<string, string>M;
int main()
{
string s1, s2;
int test, n;
cin >> test;
cin.ignore();
while(test--)
{
getline(cin, s1);
getline(cin, s2);
M[s1] = s2;
}
cin>>n;
cin.ignore();
while(n--)
{
string s3;
getline(cin, s3);
cout << M[s3] <<endl;
}
return 0;
}
No comments:
Post a Comment