H,W,A,B=map(int,input().split())
mat=[]
for _ in range(B):
  r='0'*A+'1'*(W-A)
  mat.append(r)

for _ in range(H-B):
  r='1'*A+'0'*(W-A)
  mat.append(r)

for i in range(H):
  print(mat[i]) H,W,A,B=map(int,input().split()) H map(int,input().split()) map int input().split() ().split () input split W A B mat=[] mat [] for _ in range(B):
  r='0'*A+'1'*(W-A)
  mat.append(r) _ range(B) range B r='0'*A+'1'*(W-A) r '0'*A+'1'*(W-A) '0'*A '0' A '1'*(W-A) '1' W-A W A mat.append(r) mat.append mat append r for _ in range(H-B):
  r='1'*A+'0'*(W-A)
  mat.append(r) _ range(H-B) range H-B H B r='1'*A+'0'*(W-A) r '1'*A+'0'*(W-A) '1'*A '1' A '0'*(W-A) '0' W-A W A mat.append(r) mat.append mat append r for i in range(H):
  print(mat[i]) i range(H) range H print(mat[i]) print mat[i] mat i H,W,A,B=map(int,input().split()) map(int,input().split()) H r='1'*A+'0'*(W-A) '1'*A+'0'*(W-A) r r='0'*A+'1'*(W-A) '0'*A+'1'*(W-A) r W,A,B=map(int,input().split()) map(int,input().split()) W A,B=map(int,input().split()) map(int,input().split()) A mat=[] [] mat B=map(int,input().split()) map(int,input().split()) B
H,W,A,B=map(int,input().split())
mat=[]
for _ in range(B):
  r='0'*A+'1'*(W-A)
  mat.append(r)

for _ in range(H-B):
  r='1'*A+'0'*(W-A)
  mat.append(r)

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