#include <iostream>
#include<algorithm>
using namespace std;
int main() {
int n;
cin>>n;
string tab[n];
for(int i=0; i<n; i++)
{
cin>>tab[i];
}
sort(tab, tab+n);
for(int i=0; i<n; i++)
{
cout<<tab[i]<<endl;
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZTxhbGdvcml0aG0+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CgppbnQgbWFpbigpIHsKaW50IG47CmNpbj4+bjsKc3RyaW5nIHRhYltuXTsKZm9yKGludCBpPTA7IGk8bjsgaSsrKQp7CgljaW4+PnRhYltpXTsKfQpzb3J0KHRhYiwgdGFiK24pOwpmb3IoaW50IGk9MDsgaTxuOyBpKyspCnsKCWNvdXQ8PHRhYltpXTw8ZW5kbDsKfQoJcmV0dXJuIDA7Cn0=