h,w,a,b = map(int,input().split())
x = '1'*a + '0'*(w-a)
xinv = '0'*a + '1'*(w-a)
for i in range(h):
  row = x if i < b else xinv
  print(row) h,w,a,b = map(int,input().split()) h map(int,input().split()) map int input().split() ().split () input split w a b x = '1'*a + '0'*(w-a) x '1'*a + '0'*(w-a) '1'*a '1' a '0'*(w-a) '0' w-a w a xinv = '0'*a + '1'*(w-a) xinv '0'*a + '1'*(w-a) '0'*a '0' a '1'*(w-a) '1' w-a w a for i in range(h):
  row = x if i < b else xinv
  print(row) i range(h) range h row = x if i < b else xinv row x if i < b else xinv i < b i b x xinv print(row) print row row = x if i < b else xinv x if i < b else xinv row h,w,a,b = map(int,input().split()) map(int,input().split()) h b = map(int,input().split()) map(int,input().split()) b a,b = map(int,input().split()) map(int,input().split()) a w,a,b = map(int,input().split()) map(int,input().split()) w x = '1'*a + '0'*(w-a) '1'*a + '0'*(w-a) x xinv = '0'*a + '1'*(w-a) '0'*a + '1'*(w-a) xinv
h,w,a,b = map(int,input().split())
x = '1'*a + '0'*(w-a)
xinv = '0'*a + '1'*(w-a)
for i in range(h):
  row = x if i < b else xinv
  print(row)