H,W,A,B=map(int,input().split())
for j in range(B):
    for i in range(A):
        print("1",end="")
    for i in range(W-A):
        print("0",end="")
    print()
for j in range(H-B):
    for i in range(A):
        print("0",end="")
    for i in range(W-A):
        print("1",end="")
    print()

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


