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

ans = []
for i in range(B):
  row = '1'*A+'0'*(W-A)
  ans.append(row)

for i in range(H-B):
  row = '0'*A+'1'*(W-A)
  ans.append(row)

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

ans = []
for i in range(B):
  row = '1'*A+'0'*(W-A)
  ans.append(row)

for i in range(H-B):
  row = '0'*A+'1'*(W-A)
  ans.append(row)

print(*ans,sep='\n')