#include<stdio.h>
#include<string.h>
#include<stdlib.h>
int cmpfunc(const void** a, const void** b);
/**
* 给定 n 个字符串,请对 n 个字符串按照字典序排列。
数据范围: ,字符串长度满足
*/
int main(int argc, char const *argv[])
{
int n = 0, j = 0;
char *pstr = NULL;
scanf("%d", &n);
char *in_str[n];
for (int i = 0; i < n; i++)
{
pstr = (char *)malloc(sizeof(char)*100);
scanf("%s", pstr);
in_str[i] = pstr;
}
qsort(in_str, n, sizeof(char*), cmpfunc);
for (int i = 0; i < n; i++)
{
printf("%s\n", in_str[i]);
}
return 0;
}
int cmpfunc(const void** a, const void** b){
return strcmp((char *)*a, (char *)*b);
}