import times, strutils, sequtils, math, algorithm, tables, sets, lists, intsets
import critbits, future, strformat, deques
template `max=`(x,y) = x = max(x,y)
template `min=`(x,y) = x = min(x,y)
template `mod=`(x,y) = x = x mod y
template scan2 = (scan(), scan())
template scan3 = (scan(), scan())
let read* = iterator: string {.closure.} =
    while true: (for s in stdin.readLine.split: yield s)
proc scan(): int = read().parseInt
proc scanf(): float = read().parseFloat
proc toInt(c:char): int =
    return int(c) - int('0')



proc solve()=
  var
    w = scan()
    h = scan()
    x = scan()
  if w==1 and h==1 and 9>=x:
    echo x
  elif w==1 and 9*2>=x:
    var 
      a = min(9,x)
      b = min(9,x-a)
      t = @[a,b,0]
      board = newseqwith(h,0)
    for i in 0..<h:
      board[i] = t[i.mod(3)]
    echo board.join("\n")
  elif h==1 and 9*2>=x:
    var
      a = min(9,x)
      b = min(9,x-a)
      t = @[a,b,0]
      board = newseqwith(w,0)
    for i in 0..<w:
      board[i] = t[i.mod(3)]
    echo board.join("")
  elif ((w.mod(3)==2 and h.mod(3)==2) or (w.mod(3)==1 and h.mod(3)==1))  and 9*4>=x:
    var
      a = min(9,x)
      b = min(9,x-a)
      c = min(9,x-a-b)
      d = min(9,x-a-b-c)
      t = @[@[a,b,0],@[c,d,0],@[0,0,0]]
      board = newseqwith(h,newseqwith(w,0))
    for y in 0..<h:
      for x in 0..<w:
        board[y][x] = t[y.mod(3)][x.mod(3)]
    echo board.mapIt(it.join("")).join("\n")
  elif w==1 and h==1 and 9>=x:
    echo x
  elif w==1 and 9*2>=x:
    var 
      a = min(9,x)
      b = min(9,x-a)
      t = @[a,b,0]
      board = newseqwith(h,0)
    for i in 0..<h:
      board[i] = t[i.mod(3)]
    echo board.join("\n")
  elif h==1 and 9*2>=x:
    var
      a = min(9,x)
      b = min(9,x-a)
      t = @[a,b,0]
      board = newseqwith(w,0)
    for i in 0..<w:
      board[i] = t[i.mod(3)]
    echo board.join("")


  else:
    echo -1
    return
  
solve()