#include <iostream>
#include <cstdio>
#include <algorithm>
#include <vector>


int main(void){
  int a, b, c;
  std::cin >> a >> b >> c;

  int jin[3][3];
  for(int i=0; i<3; i++){
    for(int j=0; j<3; j++){
      jin[i][j] = 0;
    }
  }
  jin[0][0] = a;
  jin[0][1] = b;
  jin[1][1] = c;

  for(int K=-1000; K<1000; K++){
    int n3 = K - a - b;
    int n8 = K - b - c;
    int n9 = K - a - c;
    int n6 = K - n3 - n9;
    int n4 = K - c - n6;
    int n7 = K - a - n4;

    if(n3 + c + n7 == K){
      std::cout << a << " " << b << " " << n3 << std::endl;
      std::cout << n4 << " " << c << " " << n6 << std::endl;
      std::cout << n7 << " " << n8 << " " << n9 << std::endl;
    }
  }

  return 0;
}

