#include<iostream>
using namespace std;
int main()
{
int a,b,c,d,e,f;
cin>>a>>b>>c;
f=max(a,max(b,c));
d=min(a,min(b,c));
e=a+b+c-d-f;
cout<<d<<endl;
cout<<e<<endl;
cout<<f<<endl;
cout<<endl;
cout<<a<<endl;
cout<<b<<endl;
cout<<c<<endl;
return 0;
}