#include <iostream>#include<stdio.h>#include <map>using namespace std; int main(){ string a,b; char line[100]; map<string, string> dictionary; std::cin.getline(line, 100); while(line[0] != ' ') { a = line; size_t pos = a.find(' '); b = a.substr(pos+1); a = a.substr(0, pos); dictionary.insert(pair<string, string>(b, a)); std::cin.getline(line, 100); } map<string, string>::iterator it; while(cin >> a) { it = dictionary.find(a); if(it == dictionary.end()) { cout << "eh" << endl; } else { cout << it->second << endl; } } return 0;}