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

S='0'*A+'1'*(W-A)
S1='1'*A+'0'*(W-A)

for i in range(H):
    if i<=B-1:
        print(S)
    else:
        print(S1) H,W,A,B=map(int,input().split()) H map(int,input().split()) map int input().split() ().split () input split W A B S='0'*A+'1'*(W-A) S '0'*A+'1'*(W-A) '0'*A '0' A '1'*(W-A) '1' W-A W A S1='1'*A+'0'*(W-A) S1 '1'*A+'0'*(W-A) '1'*A '1' A '0'*(W-A) '0' W-A W A for i in range(H):
    if i<=B-1:
        print(S)
    else:
        print(S1) i range(H) range H if i<=B-1:
        print(S)
    else:
        print(S1) i<=B-1 i B-1 B 1 print(S) print S print(S1) print S1 A,B=map(int,input().split()) map(int,input().split()) A S1='1'*A+'0'*(W-A) '1'*A+'0'*(W-A) S1 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 S='0'*A+'1'*(W-A) '0'*A+'1'*(W-A) S
H,W,A,B=map(int,input().split())

S='0'*A+'1'*(W-A)
S1='1'*A+'0'*(W-A)

for i in range(H):
    if i<=B-1:
        print(S)
    else:
        print(S1)