from sys import stdin
from collections import deque
r, c, n = map(int, stdin.readline().split())
h = deque([deque([x for x in range(i,i+c)]) for i in range(1, r*c+1, c)])
n -= 1
odd = even = n//2
even += n%2
h.rotate(odd % r)
for u in h:
u.rotate(even % c)
u = list(map(str, u))
print(' '.join(u))
沒有留言:
張貼留言