题目描述
Problem Description
A square grid of $ 3 $ cells by $ 3 $ cells with integers written inside is called a magic square if the sum of the three numbers in each row, each column, and each diagonal is equal.
For a given magic square, the following information about three cells is provided:
- The top-left cell contains the integer $ A $
- The top-center cell contains the integer $ B $
- The center cell contains the integer $ C $
From this information, determine all the integers written in the remaining cells of the original magic square.
It is guaranteed that there is exactly one magic square that satisfies the given conditions.
Input Format
The input is given from the standard input in the following format:
$ A $ $ B $ $ C $
Each integer corresponds to the description in the problem statement.
Output Format
Output the original magic square in the following format:
$ X_{1,1} $ $ X_{1,2} $ $ X_{1,3} $ $ X_{2,1} $ $ X_{2,2} $ $ X_{2,3} $ $ X_{3,1} $ $ X_{3,2} $ $ X_{3,3} $
$ X_{i,j} $ should be the integer written in the cell located at the $ i $-th row from the top and the $ j $-th column from the left in the original magic square.
Sample Input and Output
Sample Input #1
8
3
5
Sample Output #1
8 3 4
1 5 9
6 7 2
Sample Input #2
1
1
1
Sample Output #2
1 1 1
1 1 1
1 1 1
Notes/Hints
Constraints
- $0 \leq A, B, C \leq 100$
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分