h,w,a,b = map(int, input().split())

s='0'*a
s+='1'*(w-a)
for i in range(b):
    print(s)
s='1'*a
s+='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 s '0'*a '0' a s+='1'*(w-a) s '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 s '1'*a '1' a s+='0'*(w-a) s '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 h,w,a,b = map(int, input().split()) map(int, input().split()) h s='1'*a '1'*a s s+='0'*(w-a) '0'*(w-a) s b = map(int, input().split()) map(int, input().split()) b s+='1'*(w-a) '1'*(w-a) s w,a,b = map(int, input().split()) map(int, input().split()) w s='0'*a '0'*a s a,b = map(int, input().split()) map(int, input().split()) a
h,w,a,b = map(int, input().split())

s='0'*a
s+='1'*(w-a)
for i in range(b):
    print(s)
s='1'*a
s+='0'*(w-a)
for i in range(h-b):
    print(s)
