#P3479. 「ROIR 2021 Day 2」染色

「ROIR 2021 Day 2」染色

Description

Translated from ROIR 2021 Day2 T3 Хорошие раскраски on this website.

Your task is to find a solution of the follows:

Use cc kinds of colors to colorize a matrix of size n×mn\times m satisfying that for any 1x1<x2n, 1y1<y2m1\le x_1<x_2\le n,~1\le y_1<y_2\le m, the color in cells (x1,y1)(x_1,y_1), (x2,y1)(x_2,y_1), (x1,y2)(x_1,y_2), (x2,y2)(x_2,y_2) are different.

It is guaranteed that a solution exists.

Input Format

Three integers n, m, cn,~m,~c in the only line.

Output Format

Output nn lines and mm columns of numbers, each representing the color of corresponding cells.

2 2 2
1 2
2 2

Constraints

  • For 25%25\% of test data, it is guaranteed that c=2c=2.
  • For the other 75%75\% of test data, it is guaranteed that c=3c=3.
  • For all test data, it is guaranteed that 2n,m10, 2c32\le n,m\le 10,~ 2\le c\le 3.