#include<iostream>
using namespace std;
int main()
{
int a,b,c,t;
cin>>a>>b>>c;
int x=a,y=b,z=c;
if(b<a)
{
t=a;
a=b;
b=t;
}
if(c<a)
{
t=a;
a=c;
c=t;
}
if(c<b)
{
t=b;
b=c;
c=t;
}
printf("%d\n%d\n%d\n\n",a,b,c);
printf("%d\n%d\n%d\n",x,y,z);
return 0;
}