int?split_str(char*?str)//get?the?count?of?string
{
int?count?=?1; int?flag?=?0; while(*str!='\0') {if(*str?==?'?'?&&?flag?==?1)
{
count++; flag?=?0;}?
else?if(*str?!='?'?&&?*str?!=?'\0')
{
flag?=1;}
str++;
} return?(count?==?10?:?count);}
//?return?-1?when?str1?is?null?or?str1?is?litter?than?str2
//?return?1?when?str2?is?null?or?str2?is?litter?than?str2
//?return?0?when?str1?is?equal?as?str2
int?compare_str(char*?str1,?char*?str2)
{
if(str1?==?0)?return?-1; if(str2?==?0)?return?1; while?(?*str1?&&?*str2) { if(*str1?>?*str2) {return?1;
} else?if?(*str1?<?*str2) {return?-1;
} str1++; str2++; } if(*str1?>?*str2) { return?1; } else?if?(*str1?<?*str2) { return?-1; } return?0;}
void?main()
{
char?str[200]={0}; gets(str); int?n?=?split_str(str); if(n?<?1) { printf("input?error!\n"); return?-1; } //printf("n=%d\n",n); char*?a[n];//save?pointer?address int?i; for(i=0;i<n;i++)//init?the?pointer?array a[i]=0; int?index?=?0; int?flag?=?0; for(i=0;i<200?||?!str[i];i++) { if(str[i]?!=?'?'?&&?flag?==?0) {a[index++]?=?&str[i];
flag?=?1;
} else?if(str[i]?==?'?') {flag?=?0;
str[i]='\0';
continue;
} } int?j; for(i=0;i<n;i++) for(j=i+1;j<n;j++)if(1?==?compare_str(a[i],?a[j]))
{
char*?tmp;
tmp?=?a[i];
a[i]?=?a[j];
a[j]?=?tmp;
}
for(i=0;i<n;i++) printf("%s\n",a[i]);}