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

ans=[]
base="0"*A+"1"*(W-A)
nbase="1"*A+"0"*(W-A)

for i in range(B):
    ans.append(base)
for i in range(H-B):
    ans.append(nbase)

for i in range(H):
    print(ans[i]) H,W,A,B=map(int,input().split()) H map(int,input().split()) map int input().split() ().split () input split W A B ans=[] ans [] base="0"*A+"1"*(W-A) base "0"*A+"1"*(W-A) "0"*A "0" A "1"*(W-A) "1" W-A W A nbase="1"*A+"0"*(W-A) nbase "1"*A+"0"*(W-A) "1"*A "1" A "0"*(W-A) "0" W-A W A for i in range(B):
    ans.append(base) i range(B) range B ans.append(base) ans.append ans append base for i in range(H-B):
    ans.append(nbase) i range(H-B) range H-B H B ans.append(nbase) ans.append ans append nbase for i in range(H):
    print(ans[i]) i range(H) range H print(ans[i]) print ans[i] ans i ans=[] [] ans nbase="1"*A+"0"*(W-A) "1"*A+"0"*(W-A) nbase B=map(int,input().split()) map(int,input().split()) B base="0"*A+"1"*(W-A) "0"*A+"1"*(W-A) base A,B=map(int,input().split()) map(int,input().split()) A 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
H,W,A,B=map(int,input().split())

ans=[]
base="0"*A+"1"*(W-A)
nbase="1"*A+"0"*(W-A)

for i in range(B):
    ans.append(base)
for i in range(H-B):
    ans.append(nbase)

for i in range(H):
    print(ans[i])