Checkmate
Limits: 2 sec., 256 MiB
This statement was translated automatically from Ukrainian.
Zenyk and Marichka love constructive problems.
Today they want to come up with an arbitrary matrix (table) of \(n\) rows and \(n\) columns such that:
Each cell contains a single number 0 or 1.
There do not exist two adjacent cells with the same numbers.
They consider two cells to be adjacent if they share a common side.
Help them — find any such matrix.
Input
The single line contains a single integer \(n\) — the size of the square matrix.
Output
In \(n\) lines, output \(n\) numbers in each, separated by spaces, each of which is either 0 or 1 — the desired matrix.
It is guaranteed that such a matrix always exists. If there are multiple such matrices, you can output any of them.
Constraints
\(1 \le n \le 100\).
Samples
| Input (stdin) | Output (stdout) |
|---|---|
| 1 | 1 |
| Input (stdin) | Output (stdout) |
|---|---|
| 2 | 0 1 1 0 |
Notes
In the answers to the first and second examples, there are no two side-adjacent cells containing the same number.
| Element Type | Created | Who | Problem | Compiler | Result | Time (sec.) | Memory (MiB) | # | Actions |
|---|