#include using namespace std; int main(){ int n; cin>>n; string s[n],t[n]; for(int i=0;i>s[i]>>t[i]; map mp; for(int i=0;i