w,h,x = map(int,input().split()) def ans(w,h,x): if x > 36: return -1 if w == h == 1: if x > 10: return -1 return [x] if w == 1: if x > 18 or x%2 : return -1 if h%3 != 2: return -1 l = [[x//2] for i in range(h)] for i in range(2,h,3): l[i][0] = 0 return l if h == 1: if x > 18 or x%2 : return -1 if w%3 != 2: return -1 l = [[x//2]*w] for i in range(2,w,3): l[0][i] = 0 return l if h == w == 2: if x > 36: return -1 l = [[0,0],[0,0]] for i in range(2): for j in range(2): a = min(9,x) l[i][j] = a x -= a return l if h%3 != 2 or w%3 != 2: return -1 if x > 36 or x%4: return -1 l = [] base = [x//4]*w for i in range(2,w,3): base[i] = 0 for i in range(h): if i%3 == 2: l.append([0]*w) else: l.append(base) return l a = ans(w,h,x) if a == -1: print(a) exit() for i in a: print(*i,sep="")