#include using namespace std; #define L for (int i = 0; i < n; i++) using s=string;int main() {int n;cin >> n;vector a(n);s t, u;L cin >> t >> u, a[i] = t + " " + u;sort(a.begin(), a.end());L cout << a[i] << endl;return 0;}