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

hbar = H - B
wbar = W - A

s = '0' * A + '1' * wbar
sbar = '1' * A + '0' * wbar
for i in range(B):
  print(s)
for i in range(hbar):
  print(sbar) H, W, A, B = map(int, input().split()) H map(int, input().split()) map int input().split() ().split () input split W A B hbar = H - B hbar H - B H B wbar = W - A wbar W - A W A s = '0' * A + '1' * wbar s '0' * A + '1' * wbar '0' * A '0' A '1' * wbar '1' wbar sbar = '1' * A + '0' * wbar sbar '1' * A + '0' * wbar '1' * A '1' A '0' * wbar '0' wbar for i in range(B):
  print(s) i range(B) range B print(s) print s for i in range(hbar):
  print(sbar) i range(hbar) range hbar print(sbar) print sbar W, A, B = map(int, input().split()) map(int, input().split()) W hbar = H - B H - B hbar A, B = map(int, input().split()) map(int, input().split()) A sbar = '1' * A + '0' * wbar '1' * A + '0' * wbar sbar s = '0' * A + '1' * wbar '0' * A + '1' * wbar s H, W, A, B = map(int, input().split()) map(int, input().split()) H B = map(int, input().split()) map(int, input().split()) B wbar = W - A W - A wbar
H, W, A, B = map(int, input().split())

hbar = H - B
wbar = W - A

s = '0' * A + '1' * wbar
sbar = '1' * A + '0' * wbar
for i in range(B):
  print(s)
for i in range(hbar):
  print(sbar)