#include<bits/stdc++.h>
#define int long long
#define loop(i, a, b) for(int i = a; i < b; i++)
#define rep(i, a) loop(i, 0, a)
#define all(a) (a).begin(),(a).end()
using namespace std;
const int MOD = 1e9 + 7, INF = 1e9;
using vi = vector <int>;
using vvi = vector <vi>;
//g++ -std==c++14

signed main(){
    int a , b, c;
    cin >> a >> b >> c;
    int mp[3][3];
    mp[0][0] = a;
    mp[0][1] = b;
    mp[1][1] = c;
    mp[0][2] = c*3 - a - b;
    mp[2][2] = c*3 - a - c;
    mp[2][1] = c*3 - b - c;
    mp[2][0] = c*3 - mp[0][2] - c;
    mp[1][2] = c*3 - mp[0][2] - mp[2][2];
    mp[1][0] = c*3 - c - mp[1][2];
    rep(i, 3){
        rep(j, 3){
            cout << mp[i][j];
            if(j != 2)cout << " ";
        }
        cout << endl;
    }
}
