H, W, A, B = map(int, input().split())

for i in range(H):
  for j in range(W):
    if i < B and j < A or i >= B and j >= A:
      print(0, end="")
    else:
      print(1, end="")
  print("") H, W, A, B = map(int, input().split()) H map(int, input().split()) map int input().split() ().split () input split W A B for i in range(H):
  for j in range(W):
    if i < B and j < A or i >= B and j >= A:
      print(0, end="")
    else:
      print(1, end="")
  print("") i range(H) range H for j in range(W):
    if i < B and j < A or i >= B and j >= A:
      print(0, end="")
    else:
      print(1, end="")
   j range(W) range W if i < B and j < A or i >= B and j >= A:
      print(0, end="")
    else:
      print(1, end="")
   i < B and j < A or i >= B and j >= A i < B and j < A i < B i B j < A j A i >= B and j >= A i >= B i B j >= A j A print(0, end="") print 0 end="" end "" print(1, end="") print 1 end="" end "" print("") print "" H, W, A, B = map(int, input().split()) map(int, input().split()) H A, B = map(int, input().split()) map(int, input().split()) A W, A, B = map(int, input().split()) map(int, input().split()) W B = map(int, input().split()) map(int, input().split()) B
H, W, A, B = map(int, input().split())

for i in range(H):
  for j in range(W):
    if i < B and j < A or i >= B and j >= A:
      print(0, end="")
    else:
      print(1, end="")
  print("")