#include <math.h>
#include <string>
#include <map>
#include <set>
#include <iostream>
#include <vector>
#include <algorithm>
#include <limits.h>
using namespace std;
long long q, thing;
long long num, whatever;
//string cow;
int main(){
// freopen("notlast.in","r",stdin);
// freopen("notlast.out","w",stdout);
map<long long, long long> cows;
cin >> q;
for(long long i = 0; i<q; i++){
cin >> num;
if(num == 0){
cin >> thing >> whatever;
cows[thing] = whatever;
} else{
cin >> thing;
cout << cows[thing] << endl;
}
}
}