""" 端を考えると 36以下は無理 角と、その隣が調和している必要がある ABXAB BAXBA XXXX ABXA ABXAB CDXCD XXXXX ABXAB CDXCD 探索した方がいい? 9**4 """ import sys def sol(ans): for i in range(H): for j in range(W): now = 0 for x in range(i-1,i+2): for y in range(j-1,j+2): if 0 <= x < H and 0 <= y < W: now += ans[x][y] if now != X: return False for i in ans: print (*i) sys.exit() W,H,X = map(int,input().split()) ans = [[0] * W for i in range(H)] # type1 for A in range(10): for i in range(H): for j in range(W): if i % 3 == 1: ans[i][j] = A else: ans[i][j] = 0 sol(ans) for A in range(10): for i in range(H): for j in range(W): if j % 3 == 1: ans[i][j] = A else: ans[i][j] = 0 sol(ans) #type2 for A in range(10): for B in range(10): for i in range(H): for j in range(W): if i % 3 == 2 or j % 3 == 2: ans[i][j] = 0 elif i % 3 == j % 3: ans[i][j] = A else: ans[i][j] = B sol(ans) #type3 for A in range(10): for i in range(H): for j in range(W): if i % 3 == j % 3 == 1: ans[i][j] = A else: ans[i][j] = 0 sol(ans) print (-1)