d = {0:1,1:0,2:-1} w,h,x = map(int,input().split()) ans = [[0]*w for _ in range(h)] s = (2 if h%3==2 else 1)*(2 if w%3==2 else 1) if s*9 < x: print(-1) exit() a = x//s if s==1: for i in range(h): if i%3 != d[h%3]: continue for j in range(w): if j%3 != d[w%3]: continue ans[i][j] = a if s==2: V = x%2 if h%3==2: for i in range(h): if i%3 == 2: continue for j in range(w): if j%3 != d[w%3]: continue ans[i][j] = a + (i%3==0)*V else: for i in range(h): if i%3 != d[h%3]: continue for j in range(w): if j%3 == 2: continue ans[i][j] = a + (j%3==0)*V if s==4: d = {(0,0):0,(0,1):(x%4>=3),(1,0):(x%4>=2),(1,1):(x%4>=1)} for i in range(h): if i%3 == 2: continue for j in range(w): if j%3 == 2: continue ans[i][j] = a + d[i%3,j%3] for i in ans: print("".join(map(str,i)))