唯一的身份证
#include<iostream>
#include<string>
#include<map>
using namespace std;
map<string,int> ma;
int n,m;
int main()
{
//freopen("3.txt","r",stdin);
//freopen("4.txt","w",stdout);
cin>>n;
for(int i=0; i<n; i++) {
string s;
int q;
cin>>s>>q;
ma[s]=q;
}
cin>>m;
for(int i=0; i<m; i++) {
string s;
cin>>s;
cout<<ma[s]<<endl;
}
return 0;
}