R,C,N=map(int,input().split())
L=[]
k=1
for i in range(R):
Lt=[]
for j in range(C):
Lt.append(k)
k+=1
L.append(Lt)
for i in range(2,N+1):
if i%2==0:
for j in range(R):
L[j].insert(0, L[j].pop())
else:
L.insert(0, L.pop())
for i in L:
print(*i)