h,w,a,b = map(int,input().split())
c = "0"*a+"1"*(w-a)
d = "1"*a+"0"*(w-a)
for _ in range(b):
  print(c)
for _ in range(h-b):
  print(d) h,w,a,b = map(int,input().split()) h map(int,input().split()) map int input().split() ().split () input split w a b c = "0"*a+"1"*(w-a) c "0"*a+"1"*(w-a) "0"*a "0" a "1"*(w-a) "1" w-a w a d = "1"*a+"0"*(w-a) d "1"*a+"0"*(w-a) "1"*a "1" a "0"*(w-a) "0" w-a w a for _ in range(b):
  print(c) _ range(b) range b print(c) print c for _ in range(h-b):
  print(d) _ range(h-b) range h-b h b print(d) print d a,b = map(int,input().split()) map(int,input().split()) a c = "0"*a+"1"*(w-a) "0"*a+"1"*(w-a) c d = "1"*a+"0"*(w-a) "1"*a+"0"*(w-a) d h,w,a,b = map(int,input().split()) map(int,input().split()) h b = map(int,input().split()) map(int,input().split()) b w,a,b = map(int,input().split()) map(int,input().split()) w
h,w,a,b = map(int,input().split())
c = "0"*a+"1"*(w-a)
d = "1"*a+"0"*(w-a)
for _ in range(b):
  print(c)
for _ in range(h-b):
  print(d)