H,W,A,B=map(int,input().split())
ans=[['0']*W for _ in range(H)]
for a in range(B):
    ans[a][:A]=['1']*A
for a in range(B,H):
    ans[a][A:]=['1']*(W-A)
for a in ans:
    print(''.join(a)) H,W,A,B=map(int,input().split()) H map(int,input().split()) map int input().split() ().split () input split W A B ['0']*W for _ in range(H) for _ in range(H) _ range(H) range H for _ in range(H) ['0']*W ['0'] '0' W ans=[['0']*W for _ in range(H)] ans [['0']*W for _ in range(H)] for a in range(B):
    ans[a][:A]=['1']*A a range(B) range B ans[a][:A]=['1']*A ans[a][:A] [a] ans a :A A ['1']*A ['1'] '1' A for a in range(B,H):
    ans[a][A:]=['1']*(W-A) a range(B,H) range B H ans[a][A:]=['1']*(W-A) ans[a][A:] [a] ans a A: A ['1']*(W-A) ['1'] '1' W-A W A for a in ans:
    print(''.join(a)) a ans print(''.join(a)) print ''.join(a) ''.join '' join a W,A,B=map(int,input().split()) map(int,input().split()) W A,B=map(int,input().split()) map(int,input().split()) A H,W,A,B=map(int,input().split()) map(int,input().split()) H ans=[['0']*W for _ in range(H)] [['0']*W for _ in range(H)] ans B=map(int,input().split()) map(int,input().split()) B
H,W,A,B=map(int,input().split())
ans=[['0']*W for _ in range(H)]
for a in range(B):
    ans[a][:A]=['1']*A
for a in range(B,H):
    ans[a][A:]=['1']*(W-A)
for a in ans:
    print(''.join(a))