w, h, x = map(int, input().split()) if x > 36: print(-1) else: line1 = str(x % 9) + str(int(x > 9) * 9) + "0" line1 *= w // 3 + 1 line1 = line1[:w] line2 = str(int(x > 18) * 9) + str(int(x > 27) * 9) + "0" line2 *= w // 3 + 1 line2 = line2[:w] line3 = "0" * w lines = [line1, line2, line3] for l in range(h): print(lines[l % 3])