H,W,A,B = map(int,input().split())
X = ''.join(['0']*A+['1']*(W-A))
Y = ''.join(['1']*A+['0']*(W-A))
for i in range(B):
    print(X)
for i in range(H-B):
    print(Y) H,W,A,B = map(int,input().split()) H map(int,input().split()) map int input().split() ().split () input split W A B X = ''.join(['0']*A+['1']*(W-A)) X ''.join(['0']*A+['1']*(W-A)) ''.join '' join ['0']*A+['1']*(W-A) ['0']*A ['0'] '0' A ['1']*(W-A) ['1'] '1' W-A W A Y = ''.join(['1']*A+['0']*(W-A)) Y ''.join(['1']*A+['0']*(W-A)) ''.join '' join ['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) i range(B) range B print(X) print X for i in range(H-B):
    print(Y) i range(H-B) range H-B H B print(Y) print Y B = map(int,input().split()) map(int,input().split()) B Y = ''.join(['1']*A+['0']*(W-A)) ''.join(['1']*A+['0']*(W-A)) Y W,A,B = map(int,input().split()) map(int,input().split()) W H,W,A,B = map(int,input().split()) map(int,input().split()) H A,B = map(int,input().split()) map(int,input().split()) A X = ''.join(['0']*A+['1']*(W-A)) ''.join(['0']*A+['1']*(W-A)) X
H,W,A,B = map(int,input().split())
X = ''.join(['0']*A+['1']*(W-A))
Y = ''.join(['1']*A+['0']*(W-A))
for i in range(B):
    print(X)
for i in range(H-B):
    print(Y)
