#include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<cmath>
#include<stack>
#include<map>
#include<queue>
using namespace std;
int main() {
	int magic[3][3];
	cin >> magic[0][0] >> magic[0][1] >> magic[1][1];
	magic[2][1] = 2 * magic[1][1] - magic[0][1];
	magic[2][2] = 2 * magic[1][1] - magic[0][0];
	magic[1][0] = 2 * magic[2][2] - magic[0][1];
	magic[0][2] = (magic[1][0] + magic[2][1]) / 2;
	magic[2][0] = 2 * magic[1][1] - magic[0][2];
	magic[1][2] = 2 * magic[1][1] - magic[1][0];
	cout << magic[0][0] << " " << magic[0][1] << " " << magic[0][2] << endl;
	cout << magic[1][0] << " " << magic[1][1] << " " << magic[1][2] << endl;
	cout << magic[2][0] << " " << magic[2][1] << " " << magic[2][2] << endl;
	return 0;
}