#include <iostream>
#include <string>
#include <vector>
using namespace std;
#define REP(i,n) for(int i=0;i<(n);i++)

int main(){
  int A,B,C,D,E,F,G,H,I;
  cin >> A >> B >> E;
  C=3*E-A-B;
  G=2*E-C;
  H=2*E-B;
  I=2*E-A;
  D=3*E-A-G;
  F=3*E-C-I;
  cout << A << " " << B << " " << C << endl;
  cout << D << " " << E << " " << F << endl;
  cout << G << " " << H << " " << I << endl;
  return 0;
}
