H, W, A, B = [int(x) for x in input().split()]

def formatMatrix(matrix):
  return "\n".join(["".join(x) for x in matrix])

def bitShift(matrix, n):
  for i in range(len(matrix)):
    matrix[i] = shift(matrix[i], n)
  return matrix

def shift(row, n):
  new = [0]*len(row)
  i = 0
  carry = False
  for x in row:
    ## If carry and last index not placed make 1
    if (i+n) > n:
      carry = True
    new[(i+n)%len(row)] = x
    i +=1 
  ### Alternative to this block of code would be in invert an entries in the matrix, ie turn 1's to 0's and vice versa
  if carry:
    for i in range((i+n)%len(row), len(row)):
      new[i] = '1'
  return new

def usualMatrix(n):
  i = 0
  x = []
  for a in range(n):
    x.append([])
    j = 0
    for y in range(n):
      if i == j:
        x[i].append('1')
      else:
        x[i].append('0')
      j += 1
    i += 1
  return x

def transpose(m):
  new = [[] for x in range(len(m[0])) ]
  for row in m:
    i = 0
    for entry in row:
      new[i].append(entry)
      i += 1
  return new

def thing(H,W,A,B):
  if H == W and A == 1 and B == 1:
    return usualMatrix(H)
  if H == 0 or W == 0:
    return -5
  if (B > H//2 or B < 0) or (A > W//2 or A < 0):
    return -1
  if B > A:
    a = thing1(W,H,B,A)
    if type(a) == int:
      return -1
    return transpose(a)  
  else:
    return thing1(H,W,A,B)
    
def thing1(H,W,A,B):
  matrix = [['1']*A+['0']*(W-A) for x in range(H)]
  part1 = bitShift(matrix[:B], A)
  part2 = matrix[B:]
  new_matrix = part1 + part2
  return new_matrix

matrix = thing(H,W,A,B)
if type(matrix) == int:
  print(-1)
else:
  print(formatMatrix(matrix)) int(x) for x in input().split() for x in input().split() x input().split() ().split () input split for x in input().split() int(x) int x H, W, A, B = [int(x) for x in input().split()] H [int(x) for x in input().split()] W A B def formatMatrix(matrix):
  return "\n".join(["".join(x) for x in matrix]) formatMatrix "".join(x) for x in matrix for x in matrix x matrix for x in matrix "".join(x) "".join "" join x return "\n".join(["".join(x) for x in matrix]) "\n".join(["".join(x) for x in matrix]) "\n".join "\n" join ["".join(x) for x in matrix] matrix matrix def bitShift(matrix, n):
  for i in range(len(matrix)):
    matrix[i] = shift(matrix[i], n)
  return matrix bitShift for i in range(len(matrix)):
    matrix[i] = shift(matrix[i], n)
   i range(len(matrix)) range len(matrix) len matrix matrix[i] = shift(matrix[i], n) matrix[i] matrix i shift(matrix[i], n) shift matrix[i] matrix i n return matrix matrix matrix matrix n n def shift(row, n):
  new = [0]*len(row)
  i = 0
  carry = False
  for x in row:
    ## If carry and last index not placed make 1
    if (i+n) > n:
      carry = True
    new[(i+n)%len(row)] = x
    i +=1 
  ### Alternative to this block of code would be in invert an entries in the matrix, ie turn 1's to 0's and vice versa
  if carry:
    for i in range((i+n)%len(row), len(row)):
      new[i] = '1'
  return new shift new = [0]*len(row) new [0]*len(row) [0] 0 len(row) len row i = 0 i 0 carry = False carry False for x in row:
    ## If carry and last index not placed make 1
    if (i+n) > n:
      carry = True
    new[(i+n)%len(row)] = x
    i +=1 
  ### Alternative to this block of code would be in invert an entries in the matrix, ie turn 1's to 0's and vice versa
   x row if (i+n) > n:
      carry = True
     (i+n) > n i+n i n n carry = True carry True new[(i+n)%len(row)] = x new[(i+n)%len(row)] new (i+n)%len(row) i+n i n len(row) len row x i +=1 i 1 if carry:
    for i in range((i+n)%len(row), len(row)):
      new[i] = '1'
   carry for i in range((i+n)%len(row), len(row)):
      new[i] = '1'
   i range((i+n)%len(row), len(row)) range (i+n)%len(row) i+n i n len(row) len row len(row) len row new[i] = '1' new[i] new i '1' return new new row row n n def usualMatrix(n):
  i = 0
  x = []
  for a in range(n):
    x.append([])
    j = 0
    for y in range(n):
      if i == j:
        x[i].append('1')
      else:
        x[i].append('0')
      j += 1
    i += 1
  return x usualMatrix i = 0 i 0 x = [] x [] for a in range(n):
    x.append([])
    j = 0
    for y in range(n):
      if i == j:
        x[i].append('1')
      else:
        x[i].append('0')
      j += 1
    i += 1
   a range(n) range n x.append([]) x.append x append [] j = 0 j 0 for y in range(n):
      if i == j:
        x[i].append('1')
      else:
        x[i].append('0')
      j += 1
     y range(n) range n if i == j:
        x[i].append('1')
      else:
        x[i].append('0')
       i == j i j x[i].append('1') [i].append [i] x i append '1' x[i].append('0') [i].append [i] x i append '0' j += 1 j 1 i += 1 i 1 return x x n n def transpose(m):
  new = [[] for x in range(len(m[0])) ]
  for row in m:
    i = 0
    for entry in row:
      new[i].append(entry)
      i += 1
  return new transpose [] for x in range(len(m[0])) for x in range(len(m[0])) x range(len(m[0])) range len(m[0]) len m[0] m 0 for x in range(len(m[0])) [] new = [[] for x in range(len(m[0])) ] new [[] for x in range(len(m[0])) ] for row in m:
    i = 0
    for entry in row:
      new[i].append(entry)
      i += 1
   row m i = 0 i 0 for entry in row:
      new[i].append(entry)
      i += 1
   entry row new[i].append(entry) [i].append [i] new i append entry i += 1 i 1 return new new m m def thing(H,W,A,B):
  if H == W and A == 1 and B == 1:
    return usualMatrix(H)
  if H == 0 or W == 0:
    return -5
  if (B > H//2 or B < 0) or (A > W//2 or A < 0):
    return -1
  if B > A:
    a = thing1(W,H,B,A)
    if type(a) == int:
      return -1
    return transpose(a)  
  else:
    return thing1(H,W,A,B)
     thing if H == W and A == 1 and B == 1:
    return usualMatrix(H)
   H == W and A == 1 and B == 1 H == W and A == 1 H == W H W A == 1 A 1 B == 1 B 1 return usualMatrix(H) usualMatrix(H) usualMatrix H if H == 0 or W == 0:
    return -5
   H == 0 or W == 0 H == 0 H 0 W == 0 W 0 return -5 -5 if (B > H//2 or B < 0) or (A > W//2 or A < 0):
    return -1
   (B > H//2 or B < 0) or (A > W//2 or A < 0) B > H//2 or B < 0 B > H//2 B H//2 H 2 B < 0 B 0 A > W//2 or A < 0 A > W//2 A W//2 W 2 A < 0 A 0 return -1 -1 if B > A:
    a = thing1(W,H,B,A)
    if type(a) == int:
      return -1
    return transpose(a)  
  else:
    return thing1(H,W,A,B)
     B > A B A a = thing1(W,H,B,A) a thing1(W,H,B,A) thing1 W H B A if type(a) == int:
      return -1
     type(a) == int type(a) type a int return -1 -1 return transpose(a) transpose(a) transpose a return thing1(H,W,A,B) thing1(H,W,A,B) thing1 H W A B H H W W A A B B def thing1(H,W,A,B):
  matrix = [['1']*A+['0']*(W-A) for x in range(H)]
  part1 = bitShift(matrix[:B], A)
  part2 = matrix[B:]
  new_matrix = part1 + part2
  return new_matrix thing1 ['1']*A+['0']*(W-A) for x in range(H) for x in range(H) x range(H) range H for x in range(H) ['1']*A+['0']*(W-A) ['1']*A ['1'] '1' A ['0']*(W-A) ['0'] '0' W-A W A matrix = [['1']*A+['0']*(W-A) for x in range(H)] matrix [['1']*A+['0']*(W-A) for x in range(H)] part1 = bitShift(matrix[:B], A) part1 bitShift(matrix[:B], A) bitShift matrix[:B] matrix :B B A part2 = matrix[B:] part2 matrix[B:] matrix B: B new_matrix = part1 + part2 new_matrix part1 + part2 part1 part2 return new_matrix new_matrix H H W W A A B B matrix = thing(H,W,A,B) matrix thing(H,W,A,B) thing H W A B if type(matrix) == int:
  print(-1)
else:
  print(formatMatrix(matrix)) type(matrix) == int type(matrix) type matrix int print(-1) print -1 print(formatMatrix(matrix)) print formatMatrix(matrix) formatMatrix matrix def bitShift(matrix, n):
  for i in range(len(matrix)):
    matrix[i] = shift(matrix[i], n)
  return matrix def bitShift(matrix, n):
  for i in range(len(matrix)):
    matrix[i] = shift(matrix[i], n)
  return matrix bitShift def formatMatrix(matrix):
  return "\n".join(["".join(x) for x in matrix]) def formatMatrix(matrix):
  return "\n".join(["".join(x) for x in matrix]) formatMatrix def usualMatrix(n):
  i = 0
  x = []
  for a in range(n):
    x.append([])
    j = 0
    for y in range(n):
      if i == j:
        x[i].append('1')
      else:
        x[i].append('0')
      j += 1
    i += 1
  return x def usualMatrix(n):
  i = 0
  x = []
  for a in range(n):
    x.append([])
    j = 0
    for y in range(n):
      if i == j:
        x[i].append('1')
      else:
        x[i].append('0')
      j += 1
    i += 1
  return x usualMatrix matrix = thing(H,W,A,B) thing(H,W,A,B) matrix A, B = [int(x) for x in input().split()] [int(x) for x in input().split()] A def transpose(m):
  new = [[] for x in range(len(m[0])) ]
  for row in m:
    i = 0
    for entry in row:
      new[i].append(entry)
      i += 1
  return new def transpose(m):
  new = [[] for x in range(len(m[0])) ]
  for row in m:
    i = 0
    for entry in row:
      new[i].append(entry)
      i += 1
  return new transpose W, A, B = [int(x) for x in input().split()] [int(x) for x in input().split()] W B = [int(x) for x in input().split()] [int(x) for x in input().split()] B def thing1(H,W,A,B):
  matrix = [['1']*A+['0']*(W-A) for x in range(H)]
  part1 = bitShift(matrix[:B], A)
  part2 = matrix[B:]
  new_matrix = part1 + part2
  return new_matrix def thing1(H,W,A,B):
  matrix = [['1']*A+['0']*(W-A) for x in range(H)]
  part1 = bitShift(matrix[:B], A)
  part2 = matrix[B:]
  new_matrix = part1 + part2
  return new_matrix thing1 H, W, A, B = [int(x) for x in input().split()] [int(x) for x in input().split()] H def shift(row, n):
  new = [0]*len(row)
  i = 0
  carry = False
  for x in row:
    ## If carry and last index not placed make 1
    if (i+n) > n:
      carry = True
    new[(i+n)%len(row)] = x
    i +=1 
  ### Alternative to this block of code would be in invert an entries in the matrix, ie turn 1's to 0's and vice versa
  if carry:
    for i in range((i+n)%len(row), len(row)):
      new[i] = '1'
  return new def shift(row, n):
  new = [0]*len(row)
  i = 0
  carry = False
  for x in row:
    ## If carry and last index not placed make 1
    if (i+n) > n:
      carry = True
    new[(i+n)%len(row)] = x
    i +=1 
  ### Alternative to this block of code would be in invert an entries in the matrix, ie turn 1's to 0's and vice versa
  if carry:
    for i in range((i+n)%len(row), len(row)):
      new[i] = '1'
  return new shift def thing(H,W,A,B):
  if H == W and A == 1 and B == 1:
    return usualMatrix(H)
  if H == 0 or W == 0:
    return -5
  if (B > H//2 or B < 0) or (A > W//2 or A < 0):
    return -1
  if B > A:
    a = thing1(W,H,B,A)
    if type(a) == int:
      return -1
    return transpose(a)  
  else:
    return thing1(H,W,A,B)
     def thing(H,W,A,B):
  if H == W and A == 1 and B == 1:
    return usualMatrix(H)
  if H == 0 or W == 0:
    return -5
  if (B > H//2 or B < 0) or (A > W//2 or A < 0):
    return -1
  if B > A:
    a = thing1(W,H,B,A)
    if type(a) == int:
      return -1
    return transpose(a)  
  else:
    return thing1(H,W,A,B)
     thing
H, W, A, B = [int(x) for x in input().split()]

def formatMatrix(matrix):
  return "\n".join(["".join(x) for x in matrix])

def bitShift(matrix, n):
  for i in range(len(matrix)):
    matrix[i] = shift(matrix[i], n)
  return matrix

def shift(row, n):
  new = [0]*len(row)
  i = 0
  carry = False
  for x in row:
    ## If carry and last index not placed make 1
    if (i+n) > n:
      carry = True
    new[(i+n)%len(row)] = x
    i +=1 
  ### Alternative to this block of code would be in invert an entries in the matrix, ie turn 1's to 0's and vice versa
  if carry:
    for i in range((i+n)%len(row), len(row)):
      new[i] = '1'
  return new

def usualMatrix(n):
  i = 0
  x = []
  for a in range(n):
    x.append([])
    j = 0
    for y in range(n):
      if i == j:
        x[i].append('1')
      else:
        x[i].append('0')
      j += 1
    i += 1
  return x

def transpose(m):
  new = [[] for x in range(len(m[0])) ]
  for row in m:
    i = 0
    for entry in row:
      new[i].append(entry)
      i += 1
  return new

def thing(H,W,A,B):
  if H == W and A == 1 and B == 1:
    return usualMatrix(H)
  if H == 0 or W == 0:
    return -5
  if (B > H//2 or B < 0) or (A > W//2 or A < 0):
    return -1
  if B > A:
    a = thing1(W,H,B,A)
    if type(a) == int:
      return -1
    return transpose(a)  
  else:
    return thing1(H,W,A,B)
    
def thing1(H,W,A,B):
  matrix = [['1']*A+['0']*(W-A) for x in range(H)]
  part1 = bitShift(matrix[:B], A)
  part2 = matrix[B:]
  new_matrix = part1 + part2
  return new_matrix

matrix = thing(H,W,A,B)
if type(matrix) == int:
  print(-1)
else:
  print(formatMatrix(matrix))