Zenyk the Gardener
Limits: 2 sec., 256 MiB
This statement was translated automatically from Ukrainian.
Zenyk gave Marichka a garden plot of size \(n\) by \(m\), divided into cells of size \(1\) by \(1\) meter. In each cell, Marichka asked Zenyk to plant either pumpkins or roses (an interesting choice, isn’t it?).
For aesthetic reasons, she believes it should be done in such a way that there are no three consecutive cells in the same vertical, horizontal, or diagonal, planted with the same type of plant.
Initially, of course, Marichka needs to make a plan. Therefore, she
drew a table of size \(n\) by \(m\) on a piece of paper, corresponding to
her garden. Now, in each cell, she wants to place the character
x if she tells Zenyk to plant roses in the corresponding
area, or the character o if pumpkins.
Since Marichka is very busy preparing for the planting, she asked you to help her with the plan.
Input
The single line contains two space-separated integers — \(n\) and \(m\).
Output
Output \(n\) lines of \(m\) characters each — your proposed planting plan for the garden. If there are multiple possible solutions, output any of them.
Constraints
\(1 \le n, m \le 100\).
Samples
| Input (stdin) | Output (stdout) |
|---|---|
| 2 2 | xx xx |
| Input (stdin) | Output (stdout) |
|---|---|
| 4 3 | xxo oxx xoo xox |
Notes
In the second example, the field
oxx
xxo
oox
oox
would not be planted according to Marichka’s standards, because there would be a diagonal of three consecutive cells planted only with pumpkins.
Submit a solution
| Element Type | Created | Who | Problem | Compiler | Result | Time (sec.) | Memory (MiB) | # | Actions |
|---|
| Element Type | Created | Who | Problem | Compiler | Result | Time (sec.) | Memory (MiB) | # | Actions |
|---|