1. In the empty fields of the given table, write numbers so that the sum of any three consecutive fields, both horizontally and vertically, is equal to 12.

|  | 5 |  |  |  |  |  |  |
| :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- |
|  |  |  |  |  | 1 |  |  |
| 6 |  |  |  |  |  |  |  |
|  |  |  | 2 |  |  |  |  |
Solution. Let $a, b, c, d$ be four consecutive numbers written in one row (column) of the table. According to the condition $a+b+c=b+c+d$, so $a=d$. This means that in each row (column), the number from the first field repeats every two fields. If we apply this to the rows, we get the table:

|  | 5 |  |  | 5 |  |  | 5 |
| :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- |
|  |  | 1 |  |  | 1 |  |  |
| 6 |  |  | 6 |  |  | 6 |  |
| 2 |  |  | 2 |  |  | 2 |  |

Now, if we apply the same rule to the columns of the obtained table, we get the table:

| 2 | 5 |  | 2 | 5 |  | 2 | 5 |
| :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- |
|  |  | 1 |  |  | 1 |  |  |
| 6 |  |  | 6 |  |  | 6 |  |
| 2 | 5 |  | 2 | 5 |  | 2 | 5 |

The remaining numbers are determined by the condition that the sum of the numbers written in any three consecutive fields in a row (column) is equal to 12. Thus, we get the table:

| 2 | 5 | 5 | 2 | 5 | 5 | 2 | 5 |
| :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- |
| 4 | 7 | 1 | 4 | 7 | 1 | 4 | 7 |
| 6 | 0 | 6 | 6 | 0 | 6 | 6 | 0 |
| 2 | 5 | 5 | 2 | 5 | 5 | 2 | 5 |