#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for(int i = 0; i < (int)(n); i++)

int main(){
    map<string, ll> mp;
    ll q, c, x;
    string s;
    cin >> q;
    rep(i, q){
        cin >> c >> s;
        if(c == 0){
            cin >> x;
            auto t = mp.find(s);
            if(t == mp.end()){
                mp.insert(make_pair(s, x));
            }else{
                t->second = x;
            }
        }else{
            cout << mp.at(s) << endl;
        }
    }
    return 0;
}
