include
include
int cmp(const void a,const void b){
if((char)a!=(char)b)return (char)a-(char)b;
for(int i=0;i<82;i++){
if(((char)a+i)!=((char)b+i))return ((char)b+i)-((char)a+i);
}
}
void sort(char (*p)[81], int n)
{
qsort(p,n,sizeof(p[0]),cmp);
}
int main() {
char s[100][81];
int n, i;
scanf(“%d”, &n);
for (i = 0; i < n; i++) scanf(“%s”, s[i]);
sort(s, n);
for (i = 0; i < n; i++) printf(“%s\n”, s[i]);
return 0;
}
emmm,*号没上传上去