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

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