import sys def build_cells(h, w): cells = [] for i in range(h): cols = range(w) if i % 2 == 0 else range(w - 1, -1, -1) for j in cols: cells.append((i, j)) return cells def possible(h, w, m): total = h * w t = total - 2 * m if m == 0: return False return not (h > 1 and w > 1 and h % 2 == 1 and w % 2 == 1 and t == 1) def build_sparse(h, w, m, cells): total = h * w k = m - 1 low, high, mid = 1, total, k + 1 a = [[0] * w for _ in range(h)] for t in range(1, total + 1): i, j = cells[t - 1] if t <= 2 * k: if t % 2 == 1: a[i][j] = low low += 1 else: a[i][j] = high high -= 1 else: a[i][j] = mid mid += 1 return a def build_dense(h, w, m, middle_count, cells): total = h * w a = [[0] * w for _ in range(h)] vals = list(range(m + 1, m + middle_count + 1)) vals[-2], vals[-1] = vals[-1], vals[-2] for t, value in enumerate(vals): i, j = cells[t] a[i][j] = value low, high = 1, total for i in range(h): for j in range(w): if a[i][j]: continue if (i + j) % 2 == 0: a[i][j] = high high -= 1 else: a[i][j] = low low += 1 return a def main(): h, w, m = map(int, sys.stdin.read().split()) if not possible(h, w, m): print(-1) return total = h * w middle_count = total - 2 * m cells = build_cells(h, w) dense = h > 1 and w > 1 and h % 2 == 1 and w % 2 == 1 and middle_count <= 2 * w - 3 a = build_dense(h, w, m, middle_count, cells) if dense else build_sparse(h, w, m, cells) print("\n".join(" ".join(map(str, row)) for row in a)) main()