import sys input = sys.stdin.readline W,H,X=map(int,input().split()) ANS=[[-1]*W for i in range(H)] if W<=2 and H<=2: for i in range(H): for j in range(W): M=min(X,9) ANS[i][j]=M X-=M if X>0: print(-1) else: for ans in ANS: print("".join(map(str,ans))) exit() for i in range(2,H,3): for j in range(W): ANS[i][j]=0 for i in range(H): for j in range(2,W,3): ANS[i][j]=0 for i in range(H-3,-1,-3): for j in range(W): ANS[i][j]=0 for i in range(H): for j in range(W-3,-1,-3): ANS[i][j]=0 c=0 for i in range(min(H,3)): for j in range(min(W,3)): if ANS[i][j]==-1: c+=1 if X%c==0 and 0<=X//c<=9: for i in range(H): for j in range(W): if ANS[i][j]==-1: ANS[i][j]=X//c for ans in ANS: print("".join(map(str,ans))) else: print(-1)