# xy.xy. ... .wz.wz # w % 3 == 0 # .y..y. # == 1 # x..x..x # == 2 # xy.xy.xy w, h, x = map(int, input().split()) if w % 3 <= 1 and h % 3 <= 1: if x >= 10: print(-1) exit() for i in range(h): for j in range(w): print(x if i % 3 + h % 3 == 1 and j % 3 + w % 3 == 0 else 0, end='') print() exit() ans = [] if h % 3 != 2: flipped = True h, w = w, h else: flipped = False d = [[0] * 3 for _ in range(3)] if w % 3 == 2: for i in range(2): for j in range(2): d[i][j] = min(x, 9) x -= d[i][j] else: for i in range(3): for j in range(3): if not (i % 3 <= 1 and j % 3 + w % 3 == 1): continue d[i][j] = min(x, 9) x -= d[i][j] if x: print(-1) exit() for i in range(h): ans.append([]) for j in range(w): ans[-1].append(d[i%3][j%3]) if flipped: ans = zip(*ans) for t in ans: for x in t: print(x, end='') print()