#include<bits/stdc++.h>
using namespace std;
int mp[4][4];
int main(){
	int a,b,c;
	scanf("%d%d%d",&a,&b,&c);
	int tot = 3*c;
	mp[1][1] = a;
	mp[1][2] = b;
	mp[2][2] = c;
	mp[1][3] = tot - a - b;
	mp[3][2] = tot - mp[2][2] - mp[1][2];
	mp[3][1] = tot - mp[2][2] - mp[1][3];
	mp[3][3] = tot - mp[3][1] - mp[3][2];
	mp[2][1] = tot - mp[1][1] - mp[3][1];
	mp[2][3] = tot - mp[1][3] - mp[3][3];
	for(int i = 1;i <= 3;i ++){
		for(int j = 1;j <= 3;j ++){
			printf("%d ",mp[i][j]);
		}
		printf("\n");
	}
	return 0;
}