#include <iostream>
#include <string>
#include <map>
#include <cstdio>
using namespace std;
int main()
{
ios::sync_with_stdio(false);
map<string, string> dict;
string temp;
string word;
string index;
while(getline(cin,temp))
{
if(temp.find(' ') != string::npos)
{
int i;
int len = temp.size();
for(i = 0; temp[i] != ' ' ;i++)
{
word += temp[i];
}
for(i++;i < len ;i++)
{
index += temp[i];
}
dict[index] = word;
word.clear();
index.clear();
temp.clear();
}
else if(temp != "")
{
string ans = dict[temp];
if(ans!= "")
{
cout << ans << endl;
}
else
{
cout << "eh\n";
}
temp.clear();
}
}
return 0;
}
STL map水过