代码
#include <cstdio>
#include <iostream>
#include <cstring>
#include <map>
#include <string>
using namespace std;
char str[100005],a[100005],b[100005];
map<string,string> m;
int main(){
while(gets(str)&&str[0]!='\0'){
sscanf(str,"%s%s",a,b);
m[b]=a;
}
while(gets(str)){
if(m.find(str)==m.end()){
cout<<"eh"<<endl;
}else{
cout<<m[str]<<endl;
}
}
return 0;
}