#include <iostream>
using namespace std;
int main()
{
int a, b, c, x, y, z, max, min;
cin >> a >> b >> c;
max = (a + b + abs(a - b)) / 2;
z = (max + c + abs(max - c)) / 2;
min = (a + b - abs(a - b)) / 2;
x = (min + c - abs(min - c)) / 2;
y = a + b + c - x - z;
cout << x << endl << y << endl << z << endl;
cout << endl;
cout << a << endl << b << endl << c << endl;
}