#include<iostream>
#include<map>
#include<string>
using namespace std;
int main(){
int n;
cin>>n;
map<string,string>student;
while(n--){
string index;
cin>>index;
cin.ignore(1);
string name;
getline(cin,name);
student.insert(make_pair(index,name));
}
int m;
cin>>m;
while(m--){
string index;
cin>>index;
auto it=student.find(index);//it是迭代器
if(it!=student.end()){
cout<<it->first<<" "<<it->second<<endl;
}
else{
cout<<"No Answer!"<<endl;
}
}
}

京公网安备 11010502036488号