import math

## only rebel input techniques allowed.
input = str(input()).split(" ")
for index in range(len(input)):
    input[index] = int(input[index])
h, w, a, b = input[0], input[1], input[2], input[3]

## make an array of zeros
array = []
for index1 in range(h):
    row = []
    for index2 in range(w):
        row.append(0)
    array.append(row)

## okay so now we have an array of zeros
## and all we have to do is look at each row and column
def populate( h, w, a, b, array):
    rowCounter = []
    columnCounter = []
    for index in range(h):
        rowCounter.append(0)
    for index in range(w):
        columnCounter.append(0)

    for rowIndex in range(h):
        for colIndex in range(w):
            ## if after we add a one nothing is violated
            if ((rowCounter[rowIndex] < a or w  - rowCounter[rowIndex] > a) and (columnCounter[colIndex] < b or h - columnCounter[colIndex] > b)):
                array[rowIndex][colIndex] = 1
                rowCounter[rowIndex] += 1
                columnCounter[colIndex] += 1

    for element in rowCounter:
        if (min(element, w - element) != a):
            return -1
    for element in columnCounter:
        if (min(element, h - element) != b):
        ##if (element != b and h - elemet != b):
            return -1
    return array

def display(array):
    if (array == -1):
        print("-1")
        pass
    else:
        strings = []
        for row in array:
            string = ""
            for index in range(len(row)):
                if (index != len(row) - 1):
                    string += str(row[index])
                else:
                    string += str(row[index])
            strings.append(string)
        for element in strings:
            print(element)
##print("here")
"""
for h in range(1, 30):
    for w in range(1,30):
        for a in range(0, math.floor(w/2) + 1):
            for b in range(0, math.floor(h/2)+1):
                array = []
                for index1 in range(h):
                    row = []
                    for index2 in range(w):
                        row.append(0)
                    array.append(row)
                if (populate(h, w, a, b, array) == -1):
                    print(h,w,a,b)
"""
##print("done")
display(populate(h, w, a, b, array))
## we could also do this problem by splitting the array into two or four chuncks of ones and zeros
## but I cannot be bothered. import math math input = str(input()).split(" ") input str(input()).split(" ") (input()).split (input()) str input() input split " " for index in range(len(input)):
    input[index] = int(input[index]) index range(len(input)) range len(input) len input input[index] = int(input[index]) input[index] input index int(input[index]) int input[index] input index h, w, a, b = input[0], input[1], input[2], input[3] h input[0] input 0 w input[1] input 1 a input[2] input 2 b input[3] input 3 array = [] array [] for index1 in range(h):
    row = []
    for index2 in range(w):
        row.append(0)
    array.append(row)

## okay so now we have an array of zeros
## and all we have to do is look at each row and column index1 range(h) range h row = [] row [] for index2 in range(w):
        row.append(0)
     index2 range(w) range w row.append(0) row.append row append 0 array.append(row) array.append array append row def populate( h, w, a, b, array):
    rowCounter = []
    columnCounter = []
    for index in range(h):
        rowCounter.append(0)
    for index in range(w):
        columnCounter.append(0)

    for rowIndex in range(h):
        for colIndex in range(w):
            ## if after we add a one nothing is violated
            if ((rowCounter[rowIndex] < a or w  - rowCounter[rowIndex] > a) and (columnCounter[colIndex] < b or h - columnCounter[colIndex] > b)):
                array[rowIndex][colIndex] = 1
                rowCounter[rowIndex] += 1
                columnCounter[colIndex] += 1

    for element in rowCounter:
        if (min(element, w - element) != a):
            return -1
    for element in columnCounter:
        if (min(element, h - element) != b):
        ##if (element != b and h - elemet != b):
            return -1
    return array populate rowCounter = [] rowCounter [] columnCounter = [] columnCounter [] for index in range(h):
        rowCounter.append(0)
     index range(h) range h rowCounter.append(0) rowCounter.append rowCounter append 0 for index in range(w):
        columnCounter.append(0)

     index range(w) range w columnCounter.append(0) columnCounter.append columnCounter append 0 for rowIndex in range(h):
        for colIndex in range(w):
            ## if after we add a one nothing is violated
            if ((rowCounter[rowIndex] < a or w  - rowCounter[rowIndex] > a) and (columnCounter[colIndex] < b or h - columnCounter[colIndex] > b)):
                array[rowIndex][colIndex] = 1
                rowCounter[rowIndex] += 1
                columnCounter[colIndex] += 1

     rowIndex range(h) range h for colIndex in range(w):
            ## if after we add a one nothing is violated
            if ((rowCounter[rowIndex] < a or w  - rowCounter[rowIndex] > a) and (columnCounter[colIndex] < b or h - columnCounter[colIndex] > b)):
                array[rowIndex][colIndex] = 1
                rowCounter[rowIndex] += 1
                columnCounter[colIndex] += 1

     colIndex range(w) range w if ((rowCounter[rowIndex] < a or w  - rowCounter[rowIndex] > a) and (columnCounter[colIndex] < b or h - columnCounter[colIndex] > b)):
                array[rowIndex][colIndex] = 1
                rowCounter[rowIndex] += 1
                columnCounter[colIndex] += 1

     (rowCounter[rowIndex] < a or w  - rowCounter[rowIndex] > a) and (columnCounter[colIndex] < b or h - columnCounter[colIndex] > b) rowCounter[rowIndex] < a or w  - rowCounter[rowIndex] > a rowCounter[rowIndex] < a rowCounter[rowIndex] rowCounter rowIndex a w  - rowCounter[rowIndex] > a w  - rowCounter[rowIndex] w rowCounter[rowIndex] rowCounter rowIndex a columnCounter[colIndex] < b or h - columnCounter[colIndex] > b columnCounter[colIndex] < b columnCounter[colIndex] columnCounter colIndex b h - columnCounter[colIndex] > b h - columnCounter[colIndex] h columnCounter[colIndex] columnCounter colIndex b array[rowIndex][colIndex] = 1 array[rowIndex][colIndex] [rowIndex] array rowIndex colIndex 1 rowCounter[rowIndex] += 1 rowCounter[rowIndex] rowCounter rowIndex 1 columnCounter[colIndex] += 1 columnCounter[colIndex] columnCounter colIndex 1 for element in rowCounter:
        if (min(element, w - element) != a):
            return -1
     element rowCounter if (min(element, w - element) != a):
            return -1
     min(element, w - element) != a min(element, w - element) min element w - element w element a return -1 -1 for element in columnCounter:
        if (min(element, h - element) != b):
        ##if (element != b and h - elemet != b):
            return -1
     element columnCounter if (min(element, h - element) != b):
        ##if (element != b and h - elemet != b):
            return -1
     min(element, h - element) != b min(element, h - element) min element h - element h element b return -1 -1 return array array h h w w a a b b array array def display(array):
    if (array == -1):
        print("-1")
        pass
    else:
        strings = []
        for row in array:
            string = ""
            for index in range(len(row)):
                if (index != len(row) - 1):
                    string += str(row[index])
                else:
                    string += str(row[index])
            strings.append(string)
        for element in strings:
            print(element)
##print("here") display if (array == -1):
        print("-1")
        pass
    else:
        strings = []
        for row in array:
            string = ""
            for index in range(len(row)):
                if (index != len(row) - 1):
                    string += str(row[index])
                else:
                    string += str(row[index])
            strings.append(string)
        for element in strings:
            print(element)
##print("here") array == -1 array -1 print("-1") print "-1" strings = [] strings [] for row in array:
            string = ""
            for index in range(len(row)):
                if (index != len(row) - 1):
                    string += str(row[index])
                else:
                    string += str(row[index])
            strings.append(string)
         row array string = "" string "" for index in range(len(row)):
                if (index != len(row) - 1):
                    string += str(row[index])
                else:
                    string += str(row[index])
             index range(len(row)) range len(row) len row if (index != len(row) - 1):
                    string += str(row[index])
                else:
                    string += str(row[index])
             index != len(row) - 1 index len(row) - 1 len(row) len row 1 string += str(row[index]) string str(row[index]) str row[index] row index string += str(row[index]) string str(row[index]) str row[index] row index strings.append(string) strings.append strings append string for element in strings:
            print(element)
##print("here") element strings print(element) print element array array """
for h in range(1, 30):
    for w in range(1,30):
        for a in range(0, math.floor(w/2) + 1):
            for b in range(0, math.floor(h/2)+1):
                array = []
                for index1 in range(h):
                    row = []
                    for index2 in range(w):
                        row.append(0)
                    array.append(row)
                if (populate(h, w, a, b, array) == -1):
                    print(h,w,a,b)
""" display(populate(h, w, a, b, array)) display populate(h, w, a, b, array) populate h w a b array input = str(input()).split(" ") str(input()).split(" ") input b = input[0], input[1], input[2], input[3] input[3] b array = [] [] array w, a, b = input[0], input[1], input[2], input[3] input[1] w a, b = input[0], input[1], input[2], input[3] input[2] a row = [] [] row h, w, a, b = input[0], input[1], input[2], input[3] input[0] h def populate( h, w, a, b, array):
    rowCounter = []
    columnCounter = []
    for index in range(h):
        rowCounter.append(0)
    for index in range(w):
        columnCounter.append(0)

    for rowIndex in range(h):
        for colIndex in range(w):
            ## if after we add a one nothing is violated
            if ((rowCounter[rowIndex] < a or w  - rowCounter[rowIndex] > a) and (columnCounter[colIndex] < b or h - columnCounter[colIndex] > b)):
                array[rowIndex][colIndex] = 1
                rowCounter[rowIndex] += 1
                columnCounter[colIndex] += 1

    for element in rowCounter:
        if (min(element, w - element) != a):
            return -1
    for element in columnCounter:
        if (min(element, h - element) != b):
        ##if (element != b and h - elemet != b):
            return -1
    return array def populate( h, w, a, b, array):
    rowCounter = []
    columnCounter = []
    for index in range(h):
        rowCounter.append(0)
    for index in range(w):
        columnCounter.append(0)

    for rowIndex in range(h):
        for colIndex in range(w):
            ## if after we add a one nothing is violated
            if ((rowCounter[rowIndex] < a or w  - rowCounter[rowIndex] > a) and (columnCounter[colIndex] < b or h - columnCounter[colIndex] > b)):
                array[rowIndex][colIndex] = 1
                rowCounter[rowIndex] += 1
                columnCounter[colIndex] += 1

    for element in rowCounter:
        if (min(element, w - element) != a):
            return -1
    for element in columnCounter:
        if (min(element, h - element) != b):
        ##if (element != b and h - elemet != b):
            return -1
    return array populate def display(array):
    if (array == -1):
        print("-1")
        pass
    else:
        strings = []
        for row in array:
            string = ""
            for index in range(len(row)):
                if (index != len(row) - 1):
                    string += str(row[index])
                else:
                    string += str(row[index])
            strings.append(string)
        for element in strings:
            print(element)
##print("here") def display(array):
    if (array == -1):
        print("-1")
        pass
    else:
        strings = []
        for row in array:
            string = ""
            for index in range(len(row)):
                if (index != len(row) - 1):
                    string += str(row[index])
                else:
                    string += str(row[index])
            strings.append(string)
        for element in strings:
            print(element)
##print("here") display
import math

## only rebel input techniques allowed.
input = str(input()).split(" ")
for index in range(len(input)):
    input[index] = int(input[index])
h, w, a, b = input[0], input[1], input[2], input[3]

## make an array of zeros
array = []
for index1 in range(h):
    row = []
    for index2 in range(w):
        row.append(0)
    array.append(row)

## okay so now we have an array of zeros
## and all we have to do is look at each row and column
def populate( h, w, a, b, array):
    rowCounter = []
    columnCounter = []
    for index in range(h):
        rowCounter.append(0)
    for index in range(w):
        columnCounter.append(0)

    for rowIndex in range(h):
        for colIndex in range(w):
            ## if after we add a one nothing is violated
            if ((rowCounter[rowIndex] < a or w  - rowCounter[rowIndex] > a) and (columnCounter[colIndex] < b or h - columnCounter[colIndex] > b)):
                array[rowIndex][colIndex] = 1
                rowCounter[rowIndex] += 1
                columnCounter[colIndex] += 1

    for element in rowCounter:
        if (min(element, w - element) != a):
            return -1
    for element in columnCounter:
        if (min(element, h - element) != b):
        ##if (element != b and h - elemet != b):
            return -1
    return array

def display(array):
    if (array == -1):
        print("-1")
        pass
    else:
        strings = []
        for row in array:
            string = ""
            for index in range(len(row)):
                if (index != len(row) - 1):
                    string += str(row[index])
                else:
                    string += str(row[index])
            strings.append(string)
        for element in strings:
            print(element)
##print("here")
"""
for h in range(1, 30):
    for w in range(1,30):
        for a in range(0, math.floor(w/2) + 1):
            for b in range(0, math.floor(h/2)+1):
                array = []
                for index1 in range(h):
                    row = []
                    for index2 in range(w):
                        row.append(0)
                    array.append(row)
                if (populate(h, w, a, b, array) == -1):
                    print(h,w,a,b)
"""
##print("done")
display(populate(h, w, a, b, array))
## we could also do this problem by splitting the array into two or four chuncks of ones and zeros
## but I cannot be bothered.
