W, H, X = map(int ,input().split()) ans = [[-1] * (W + 2) for _ in range(H + 2)] val = (1 + int(H%3==2)) * (1 + int(W%3==2)) * 9 if X > val: print(-1) exit() for i in range(H + 2): for j in range(W + 2): if i % 3 == 0 or (H + 1 - i) % 3 == 0 or j % 3 == 0 or (W + 1 - j) % 3 == 0: ans[i][j] = 0 for i in range(3): for j in range(3): if ans[i][j] == 0: continue v = min(9, X) X -= v ans[i][j] = v for i in range(H + 2): for j in range(W + 2): ans[i][j] = ans[i%3][j%3] for i in range(1, H + 1): print(*ans[i][1:-1], sep="")