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

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

for i in range(h):
    for j in range(w):
        if i < b and j < a:
            print(0, end="")
        elif i >= b and j < a:
            print(1, end="")
        elif i < b and j >= a:
            print(1, end="")
        else:
            print(0, end="")
    print()
