sample input
3
word fish egg
sample output
egg
fish
word
#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
bool cmp(string a,string b)
{
return a<b;
}
int main()
{
int n;
string s[10];
cin>>n;
for(int i=0;i<n;i++)
cin>>s[i];
sort(s,s+n,cmp);
for(int i=0;i<n;i++)
cout<<s[i]<<endl;
}