#include<stdio.h>
#include<math.h>
int main()
{
int a,b,c,d,x,y,z;
scanf("%d %d %d",&a,&b,&c);
x=a,y=b,z=c;
if(a > b)
{
d = a;
a = b;
b = d;
}
if(a > c)
{
d = a;
a = c;
c = d;
}
if(b > c)
{
d = b;
b = c;
c = d;
}
printf("%d\n",a);
printf("%d\n",b);
printf("%d\n",c);
printf("\n");
printf("%d\n",x);
printf("%d\n",y);
printf("%d\n",z);
}