#include<bits/stdc++.h>
using namespace std;
int a,b,c,x[4][4],all;
int main()
{
	ios::sync_with_stdio(false);
	cin>>a>>b>>c;
	x[1][1]=a;
	x[1][2]=b;
	x[2][2]=c;
	all=3*x[2][2];
	x[3][3]=all-x[2][2]-x[1][1];
	x[1][3]=all-x[1][1]-x[1][2];
	x[2][3]=all-x[1][3]-x[3][3];
	x[2][1]=all-x[2][3]-x[2][2];
	x[3][1]=all-x[1][1]-x[2][1];
	x[3][2]=all-x[3][1]-x[3][3];
	cout<<x[1][1]<<" "<<x[1][2]<<" "<<x[1][3]<<" "<<endl;
	cout<<x[2][1]<<" "<<x[2][2]<<" "<<x[2][3]<<" "<<endl;
	cout<<x[3][1]<<" "<<x[3][2]<<" "<<x[3][3]<<" "<<endl;
	return 0;
}
