import sys import numpy as np readline = sys.stdin.readline read = sys.stdin.read w, h, x = map(int, readline().split()) if x <= 9: ans = np.zeros((h,w), dtype=np.int64) f = [1,0,0] ans[f[h%3]::3,f[w%3]::3] = x for l in ans: print(''.join(map(str, l))) sys.exit() if x <= 18: if w % 3 == 2: ans = np.zeros((h,w), dtype=np.int64) f = [1,0,0] ans[f[h%3]::3,::3] = 9 ans[f[h%3]::3,1::3] = x - 9 for l in ans: print(''.join(map(str, l))) sys.exit() if h % 3 == 2: ans = np.zeros((h,w), dtype=np.int64) f = [1,0,0] ans[::3,f[w%3]::3] = 9 ans[1::3,f[w%3]::3] = x - 9 for l in ans: print(''.join(map(str, l))) sys.exit() if x <= 36 and h % 3 == 2 and w % 3 == 2: ans = np.zeros((h,w), dtype=np.int64) if x <= 27: a = np.array([[9,9,0],[x-18,0,0],[0,0,0]], dtype=np.int64) else: a = np.array([[9,9,0],[9,x-27,0],[0,0,0]], dtype=np.int64) ans = np.tile(a,((h+1)//3,(w+1)//3))[:-1,:-1] for l in ans: print(''.join(map(str, l))) sys.exit() print(-1)