W,H,X=map(int,input().split()) L=[[0 for i in range(W)] for j in range(H)] L=[[-1 for i in range(W)] for j in range(H)] for i in range(H): if i%3==2: L[i]=["0"]*W for i in range(H): for j in range(W): if j%3==2: L[i][j]="0" if H%3==1: for i in range(H): if i%3==1: L[i]=["0"]*W if H%3==0: for i in range(H): if i%3==0: L[i]=["0"]*W if W%3==1: for i in range(H): for j in range(W): if j%3==1: L[i][j]="0" if W%3==0: for i in range(H): for j in range(W): if j%3==0: L[i][j]="0" R=[[-1 for i in range(3)] for j in range(3)] for i in range(3): for j in range(3): if i>=H or j>=W: continue R[i][j]=L[i][j] if L[i][j]!="0": if X<=9: R[i][j]=X X=0 else: R[i][j]=9 X-=9 if X!=0: print(-1) exit() for i in range(H): for j in range(W): L[i][j]=str(R[i%3][j%3]) print("".join(L[i]))