#import S[55][9];main(i){for(gets(*S);gets(S+i++););qsort(S,i,36,strcmp);for(i=1;*S[++i];)puts(S+i);}