#include <bits/stdc++.h>
using namespace std;
#define sz(x) ((int) (x).size())
#define forn(i,n) for (int i = 0; i < int(n); ++i)
typedef long long ll;
typedef long long i64;
typedef long double ld;
const int inf = int(1e9) + int(1e5);
const ll infl = ll(2e18) + ll(1e10);

int a[3][3];

int main() {
    #ifdef LOCAL
    assert(freopen("d.in", "r", stdin));
    #else
    #endif
    cin >> a[0][0] >> a[0][1] >> a[1][1];

    int s = 3 * a[1][1];
    a[0][2] = s - a[0][1] - a[0][0];
    a[2][1] = s - a[0][1] - a[1][1];
    a[2][2] = s - a[0][0] - a[1][1];
    a[1][2] = s - a[0][2] - a[2][2];
    a[1][0] = s - a[1][1] - a[1][2];
    a[2][0] = s - a[2][1] - a[2][2];

    forn (i, 3) {
        forn (j, 3)
            cout << a[i][j] << ' ';
        cout << '\n';
    }
}
