using System; using static System.Console; using System.Linq; using System.Collections.Generic; class Program { static int NN => int.Parse(ReadLine()); static int[] NList => ReadLine().Split().Select(int.Parse).ToArray(); static int[][] NArr(long n) => Enumerable.Repeat(0, (int)n).Select(_ => NList).ToArray(); static int[] LList(long n) => Enumerable.Repeat(0, (int)n).Select(_ => int.Parse(ReadLine())).ToArray(); public static void Main() { Solve(); } static void Solve() { var c = NList; var (w, h, x) = (c[0], c[1], c[2]); var hoffset = h % 3 == 0 ? 1 : 0; var woffset = w % 3 == 0 ? 1 : 0; var hwidth = h % 3 == 2 ? 2 : 1; var wwidth = w % 3 == 2 ? 2 : 1; var max = hwidth * wwidth * 9; if (x > max) { WriteLine(-1); return; } var ans = new int[h][]; for (var i = 0; i < ans.Length; ++i) ans[i] = new int[w]; var rest = x; for (var i = 0; i < hwidth; ++i) for (var j = 0; j < wwidth; ++j) { ans[i + hoffset][j + woffset] = Math.Min(9, rest); rest -= ans[i][j]; } for (var i = 0; i < h; ++i) for (var j = 0; j < w; ++j) { if (i < 3 && j < 3) continue; ans[i][j] = ans[i % 3][j % 3]; } WriteLine(string.Join("\n", ans.Select(ai => string.Concat(ai)))); } }