#include <stdio.h>
#include <string.h>

#define max 80
int main()
{
    char str[][max] = {"zhang","ziang","zaang","zbang","zcang","zdang","zeang","zfang","zgang","zhang","\0"} ;
    char temp[10];
    int i,j;
    i=0;
    while(strcmp(str[i],"\0")!=0)
    {
        puts(str[i]);
        i++;
    }
    for(i=0; strcmp(str[i],"\0")!=0; i++)
    {
        for(j=i+1; strcmp(str[j],"\0")!=0; j++)
        {
            if(strcmp(str[i],str[j])>0)
            {
                strcpy (temp,str[i]);
                strcpy (str[i],str[j]);
                strcpy (str[j],temp);
            }
        }
    }
    printf("\n");
    i=0;
    while(strcmp(str[i],"\0")!=0)
    {
        puts(str[i]);
        i++;
    }

    return 0;
}