w,h,x = map(int,input().split()) if x>9: print(-1) else: m = [[0 for _ in range(w)]for __ in range(h)] for i in range(1,h,3): for j in range(1,w,3): m[i][j] = x if w%3 == 1: for i in range(1,h,3): m[i][-1] = x if h%3 == 1: for i in range(1,w,3): m[-1][i] = x for i in range(h): for j in range(w): print(m[i][j],end = "") print()