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