H,W,A,B=map(int,input().split())
X=[0]*A+[1]*(W-A)
Y=[1]*A+[0]*(W-A)
for i in range(B):
  print(*X,sep='')
for i in range(H-B):
  print(*Y,sep='') H,W,A,B=map(int,input().split()) H map(int,input().split()) map int input().split() ().split () input split W A B X=[0]*A+[1]*(W-A) X [0]*A+[1]*(W-A) [0]*A [0] 0 A [1]*(W-A) [1] 1 W-A W A Y=[1]*A+[0]*(W-A) Y [1]*A+[0]*(W-A) [1]*A [1] 1 A [0]*(W-A) [0] 0 W-A W A for i in range(B):
  print(*X,sep='') i range(B) range B print(*X,sep='') print *X X sep='' sep '' for i in range(H-B):
  print(*Y,sep='') i range(H-B) range H-B H B print(*Y,sep='') print *Y Y sep='' sep '' H,W,A,B=map(int,input().split()) map(int,input().split()) H A,B=map(int,input().split()) map(int,input().split()) A Y=[1]*A+[0]*(W-A) [1]*A+[0]*(W-A) Y W,A,B=map(int,input().split()) map(int,input().split()) W X=[0]*A+[1]*(W-A) [0]*A+[1]*(W-A) X B=map(int,input().split()) map(int,input().split()) B
H,W,A,B=map(int,input().split())
X=[0]*A+[1]*(W-A)
Y=[1]*A+[0]*(W-A)
for i in range(B):
  print(*X,sep='')
for i in range(H-B):
  print(*Y,sep='')