#include <bits/stdc++.h>
using namespace std;

int main() {
  int num_query; cin >> num_query;
  map<string, int> dictionary;
  
  for (int i = 0; i < num_query; i++) {
    int command; scanf("%d", &command);
    char key[20]; scanf("%s", key);
    
    switch (command) {
      case 0:
        int value; scanf("%d", &value);
        if (dictionary.count(key)) {
          dictionary.at(key) = value;
        } else {
          dictionary.insert(make_pair(key, value));
        }
        break;
        
      case 1:
        printf("%d\n", dictionary.at(key));
        break;
    }
  }
}
