#include <iostream>
using namespace std;
int main()
{
int a, b, c, m, n, p;
cin >> a >> b >> c;
m = a, n = b, p = c;
if(a > b)
{
int t = b;
b = a;
a = t;
}
if(a > c)
{
int t = c;
c = a;
a = t;
}
if(b > c)
{
int t = b;
b = c;
c = t;
}
cout << a << endl << b << endl << c << endl << endl;
cout << m << endl << n << endl << p << endl;
return 0;
}