import java.io.*
import java.util.*
import java.lang.*
import java.lang.Math.*


fun solve() {
    val (H, W, A, B) = rd.readIntArray()

    if (A*2>W || B*2>H) {
        println("No")
        return
    }

    if (H == 1) {
        println("1".repeat(A) + "0".repeat(W-A))
        return
    }
    if (W == 1) {
        for (i in 0 until B) {
            println("1")
        }
        for (i in 0 until H-B) {
            println("0")
        }
        return
    }


    var rSum = IntArray(H){0}
    var cSum = IntArray(W){0}
    var gd = Array(H){IntArray(W){0}}

    fun isGood(): Boolean {
        var res = true
        for (i in 0 until H) {
            if (min(rSum[i], W-rSum[i]) == A) continue
            res = false
            break
        }
        if (res) {
            for (j in 0 until W) {
                if (min(cSum[j], H - cSum[j]) == B) continue
                res = false
                break
            }
        }
        return res
    }

    fun put(isColOne: Boolean, isRowOne: Boolean): Boolean {
        rSum = IntArray(H){0}
        cSum = IntArray(W){0}
        gd = Array(H){IntArray(W){0}}

        fun calc(cLim: Int, rLim: Int) {
            for (i in 0 until H) {
                for (j in 0 until W) {
                    if (cSum[j] >= cLim || rSum[i] >= rLim) continue
                    gd[i][j] = 1
                    rSum[i] += 1
                    cSum[j] += 1
                }
            }
        }

        if (isColOne && isRowOne) {
            calc(B, A)
        }
        else if (!isColOne && isRowOne) {
            calc(H-B, A)
        }
        else if (isColOne && !isRowOne) {
            calc(B, W-A)
        }
        else {
            calc(H-B, W-A)
        }

        return isGood()
    }

    fun paint() {
        for (i in 0 until H) {
            println(gd[i].joinToString(""))
        }
    }

    if (put(true, true)) {
        paint()
    }
    else if (put(true, false)) {
        paint()
    }
    else if (put(false, true)) {
        paint()
    }
    else if (put(false, false)) {
        paint()
    } else {
        println("No")
    }

    return
}


//val rd = debug.Reader("agc", "038", "a", "sample-4")
val rd = Reader()


fun main(args: Array<String>) {
    try {
        var exception: Throwable? = null
        val sth = Thread(null, SolveThread(), "solveThread", 128 * 1024 * 1024)
        sth.setUncaughtExceptionHandler { _, e -> exception = e }
        sth.start(); sth.join()
        if (exception != null) throw exception!!
    } catch (e: Exception) { throw e }
}
const val MOD = 1_000_000_007L; const val INF = Int.MAX_VALUE/2; const val LINF = Long.MAX_VALUE/2
data class IntPair(val first: Int, val second: Int)
val errPrintln: (Any) -> Unit = { msg -> System.err.println(msg) }
fun rAssert(exp: Boolean, lazyMsg: () -> String = {""}) {
    if (!exp) { val msg = lazyMsg(); errPrintln("EAssert Error: $msg"); throw Error(msg) }
}
fun tAssert(exp: Boolean, lazyMsg: () -> String = {""}) {
    if (!exp) { val msg = lazyMsg(); errPrintln("TAssert Error: $msg"); Thread.sleep(3000) }
}
class SolveThread : Runnable {
    override fun run() { solve() }
}
class Reader {
    private val br = BufferedReader(InputStreamReader(System.`in`))
    val readString: () -> String = { br.readLine() }
    val readInt: () -> Int = { br.readLine().toInt() }
    val readLong: () -> Long = { br.readLine().toLong() }
    val readIntArray: () -> IntArray = { br.readLine().split(' ').map { it.toInt() }.toIntArray() }
    val readLongArray: () -> LongArray = { br.readLine().split(' ').map { it.toLong() }.toLongArray() }
    val readListInt: () -> List<Int> = { br.readLine().split(' ').map { it.toInt() } }
    val readListLong: () -> List<Long> = { br.readLine().split(' ').map { it.toLong() } }
}


Measured memory_bytes: 71356