#include"stdio.h"
#include"string.h"
int main(int argc,int* argv[]){
char* t;
char *p1 = NULL,*p2 = NULL,*p3 = NULL;
char ch1[20] = {0},ch2[20] = {0},ch3[20] = {0};
p1 = ch1;
p2 = ch2;
p3 = ch3;
printf("No.1");
scanf("%s",p1);
fflush(stdin);
printf("No.2");
scanf("%s",p2);
fflush(stdin);
printf("No.3");
scanf("%s",p3);
fflush(stdin);
if(strcmp(p1,p2)>0){
t = p1;
p1 = p2;
p2 = t;
}
if(strcmp(p1,p3)>0){
t = p1;
p1 = p3;
p3 = t;
}
if(strcmp(p2,p3)>0){
t = p2;
p2 = p3;
p3 = t;
}
printf("%s\n%s\n%s\n",p1,p2,p3);
return 0;
}