#include <iostream>
using namespace std;
int main()
{
int a, b, c;
scanf("%d%d%d", &a,&b,&c);
int d, e, f;
d = a;
e = b;
f = c;
if (a > b)
{
int t;
t = a;
a = b;
b = t;
}
if (a > c)
{
int t;
t = a;
a = c;
c = t;
}
if (b > c)
{
int t;
t = b;
b = c;
c = t;
}
printf("%d\n%d\n%d\n", a, b, c);
printf("\n");
printf("%d\n%d\n%d\n", d, e, f);
return 0;
}