# Problem A - 01 Matrix

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

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

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

for i in range(1, H+1):
    for j in range(1, W+1):
        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="")
        elif i>B and j>A:
            print('0', end="")
    print()
