http://acm.hdu.edu.cn/showproblem.php?pid=2000
#include <stdio.h>
int main()
{
char a[3],temp;
int i,j;
while(scanf("%s",&a)!=EOF){
for(i=0;i<3;i++){
for(j=0;j+1<3-i;j++){
if(a[j]>a[j+1]){
temp=a[j];
a[j]=a[j+1];
a[j+1]=temp;
}
}
}
printf("%c %c %c\n",a[0],a[1],a[2]);
}
return 0;
}