#include <iostream>

using namespace std;

int info[22];

int main()
{
    int n, a, v;
    int max_idx = -1;

    cin >> n;
    cerr << n << endl;;

    for (int i = 0; i < n; i++) {
        cin >> a >> v;
        cerr << a << " " << v << endl;
        info[a] = v;
    }
    
    // for (int i = 1; i <= n; i++)
    //     if (info[max_idx] < info[i])
    //         max_idx = i;
    // cout << max_idx << " " << info[max_idx] << endl;
    

    return 0;
}