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