#include<iostream>
#include<algorithm>
#include<vector>
#include<map>
using namespace std;
int n;
map<string,int>S;
int main()
{
  cin>>n;
  for(int i=0;i<n;i++)
  {
    int c;string s;cin>>c>>s;
    if(c==0)
    {
      int x;cin>>x;S[s]=x;
    }
    else cout<<S[s]<<endl;
  }
}

