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