#include using namespace std; int main() { int N; cin >> N; set> SE; string S, T; while (cin >> S >> T) SE.insert({S, T}); for (auto [a, b] : SE) cout << a << " " << b << "\n"; }