W, H, X = map(int, input().split()) ans = [[0]*(W+1) for _ in range(H+1)] x1 = [1, 1, 0, -1, -1, -1, 0, 1, 0] y1 = [0, 1, 1, 1, 0, -1, -1, -1, 0] def debag(): r = 0 for x in range(H): for y in range(W): sm = 0 for px, py in zip(x1, y1): cx = x+px; cy = y+py if 0<=cx 36: print(-1) exit() elif W < 2 or W < 2: c = min(H, 2)*min(W, 2) if X > 9*c: exit() else: print(min(X, 9), X-min(X, 9)) else: a, b = X//4, X%4 x = [] for i in range(4): if b > 0: ex = 1 else: ex = 0 if i < 2: ans[0][i] = a + ex b -= 1 else: ans[1][i-2] = a + ex for i in range(3): xx = [] for j in range(3): xx.append(ans[i][j]) x.append(xx) for i in range(H): for j in range(W): ans[i][j] = x[i%3][j%3] ans[i].pop() print(*ans[i], sep = '') # print(debag())