Triomino
Tile the rectangular grid m × n with triomino figures which are shown at the picture. The figures can be rotated through angles which are multiples of 90º, but it’s prohibited to overlay figures at the same place. Of course, not all m × n rectangles can be tiled completely, but it’s possible to minimize number of non-tiled cells.
Write a program that finds any allowed tiling of m × n rectangle with triomino figures, which have minimal possible number of non-tiled cells.
Input
Two integers m and n (1 ≤ m ≤ 100, 1 ≤ n ≤ 100) — number of rows and columns in rectangle.
Output
Print m rows with n numbers in each row. Each number indicates the number of the triomino figure that covers this cell. If current cell is not covered by any figure, 0 number should be printed. Figures should be denoted with different numbers 1, 2, 3, ..., k (where k is total number of used figures).
Usually, there are many different correct answers for the same input data. Your program should write any one of them.