W,H,X=map(int,input().split()) if H==W==1: print(X if X<=9 else -1) exit() elif H==1 and W==2: if X<=18: p=min(9,X) q=X-p print(p,q) else: print(-1) exit() elif H==2 and W==1: if X<=18: p=min(9,X) q=X-p print(p,q,sep="\n") else: print(-1) exit() if X>36 or H%3==0 or W%3==0: print(-1) exit() P=[0]*4 Y=X for i in range(4): a=min(Y,9) P[i]=a Y-=a Q=[[P[0],P[1],0],[P[2],P[3],0],[0,0,0]] R=[("{}{}{}".format(x[0],x[1],x[2]))*W for x in Q] for i in range(H): print(R[i%3][:W])