import sys import numpy as np readline = sys.stdin.readline read = sys.stdin.read w, h, x = map(int, readline().split()) if w == 1: if x <= 9: ans = np.zeros(h, dtype=np.int64) ans[::2] = x print('\n'.join(map(str, ans.tolist()))) sys.exit() if x <= 18 and h % 3 == 2: ans = np.zeros(h, dtype=np.int64) ans[::3] = 9 ans[1::3] = x-9 print('\n'.join(map(str, ans.tolist()))) sys.exit() print(-1) sys.exit() if h == 1: if x <= 9: ans = np.zeros(w, dtype=np.int64) ans[::2] = x print(''.join(map(str, ans.tolist()))) sys.exit() if x <= 18 and w % 3 == 2: ans = np.zeros(w, dtype=np.int64) ans[::3] = 9 ans[1::3] = x-9 print(''.join(map(str, ans.tolist()))) sys.exit() print(-1) sys.exit() if w == 2: if x <= 18: ans = np.zeros((h,w), dtype=np.int64) ans[::2,0] = min(x,9) ans[::2,1] = x - min(x,9) ans = ans.tolist() for l in ans: print(''.join(map(str, l))) sys.exit() if x <= 36 and h % 3 == 2: ans = np.zeros((h,w), dtype=np.int64) ans[::3] = 9 ans[1::3,0] = min(x-18,9) ans[1::3,1] = x - 18 - min(x-18,9) for l in ans: print(''.join(map(str, l))) sys.exit() print(-1) sys.exit() if h == 2: if x <= 18: ans = np.zeros((h,w), dtype=np.int64) ans[0,::2] = min(x,9) ans[1,::2] = x - min(x,9) ans = ans.tolist() for l in ans: print(''.join(map(str, l))) sys.exit() if x <= 36 and w % 3 == 2: ans = np.zeros((h,w), dtype=np.int64) ans[:,::3] = 9 ans[0,1::3] = min(x-18,9) ans[1,1::3] = x - 18 - min(x-18,9) for l in ans: print(''.join(map(str, l))) sys.exit() print(-1) sys.exit() 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)