Magic Square

Time limit1sMemory limit128 MB

Problem

A magic square is made of 3 x 3 small squares. Each small square contains a positive integer no greater than 20,000.

In a magic square, the sums of the numbers in every row, every column, and both diagonals are all equal.

Sanggeun made a magic square, but Changyeong erased some of its numbers. Since Changyeong was kind enough, he erased at most three numbers.

Given a magic square with some numbers erased, write a program that fills in the erased numbers.

Input

Three lines are given. Each line contains three numbers from the magic square. An erased number is given as 0.

Output

Print the magic square after filling in the erased numbers.