from itertools import product W, H, X = map(int, input().split()) if X > 9 * 4: print(-1) exit() def is_ok(): for y in range(H): for x in range(W): t = 0 for dy, dx in [(-1, -1), (-1, 0), (-1, 1), (0, -1), (0, 0), (0, 1), (1, -1), (1, 0), (1, 1)]: ny, nx = y + dy, x + dx if ny < 0 or ny >= H or nx < 0 or nx >= W: continue t += result[ny][nx] if t != X: return False return True result = [None] * H for p in product(range(0, 10), repeat=H * W): for y in range(H): result[y] = list(p[W * y:W * (y + 1)]) if is_ok(): for y in range(H): print(*result[y], sep='') exit() print(-1)