#include <bits/stdc++.h>
#define int long long
#define MOD 1000000007
using namespace std;

signed main(){
	int n[9];
	cin >> n[0] >> n[1] >> n[4];
	n[2] = n[4] * 3 - n[0] - n[1];
	n[6] = n[4] * 2 - n[2];
	n[7] = n[4] * 2 - n[1];
	n[8] = n[4] * 2 - n[0];
	n[3] = n[4] * 3 - n[0] - n[6];
	n[5] = n[4] * 3 - n[2] - n[8];
	for(int i = 0;i < 3;i++){
		for(int j = 0;j < 3;j++) cout << (j ? " " : "") << n[i * 3 + j];
		cout << endl;
	}
	return 0;
}