#include<bits/stdc++.h>

using namespace std;

int main()
{
	int a,b,e;
	scanf("%d%d%d",&a,&b,&e);
	int base = 3 * e;
	int c = base-a-b;
	int i = base-a-e;
	int f = base-c-i;
	int d = base-e-f;
	int h = base-b-e;
	int g = base-a-d;
	printf("%d %d %d\n",a,b,c);
	printf("%d %d %d\n",d,e,f);
	printf("%d %d %d\n",g,h,i);
}