import sys sys.setrecursionlimit(10**7) def I(): return int(sys.stdin.readline().rstrip()) def MI(): return map(int,sys.stdin.readline().rstrip().split()) def LI(): return list(map(int,sys.stdin.readline().rstrip().split())) def LI2(): return list(map(int,sys.stdin.readline().rstrip())) def S(): return sys.stdin.readline().rstrip() def LS(): return list(sys.stdin.readline().rstrip().split()) def LS2(): return list(sys.stdin.readline().rstrip()) W,H,X = MI() if W >= 2 and H >= 2: if X > 36: print(-1) exit() A = [] for i in range(4): for j in range(10): if 0 <= X-j <= 9*(3-i): X -= j A.append(j) break a0 = '{}{}0'.format(A[0],A[1]) a1 = '{}{}0'.format(A[2],A[3]) ans0 = a0*(W//3) ans1 = a1*(W//3) if W % 3 != 0: ans0 += str(A[0]) ans1 += str(A[2]) if W % 3 == 2: ans0 += str(A[1]) ans1 += str(A[3]) ans2 = '0'*W for i in range(H): if i % 3 == 0: print(ans0) elif i % 3 == 1: print(ans1) else: print(ans2) elif H == 1 and W >= 2: if X > 18: print(-1) exit() A = [] for i in range(2): for j in range(10): if 0 <= X-j <= 9*(1-i): X -= j A.append(j) break a0 = '{}{}0'.format(A[0],A[1]) ans0 = a0*(W//3) if W % 3 != 0: ans0 += str(A[0]) if W % 3 == 2: ans0 += str(A[1]) print(ans0) elif H >= 2 and W == 1: if X > 18: print(-1) exit() A = [] for i in range(2): for j in range(10): if 0 <= X-j <= 9*(1-i): X -= j A.append(j) break for i in range(H): if i % 3 == 0: print(A[0]) elif i % 3 == 1: print(A[1]) else: print(0) else: if X > 9: print(-1) exit() print(X)