#include <string>
#include<iostream>
#include<iomanip>
#include<sstream>
#include<algorithm>
#include<vector>
using namespace std;
int main()
{
int n;
cin>>n;
vector<string> ss;
string s;
int i,j;
for(i=0;i<n;i++)
{
cin>>s;
ss.push_back(s);
}
sort(ss.begin(),ss.end());
for(i=0;i<n;i++)
{
cout<<ss[i]<<endl;
}
return 0;
}