"use strict"

const arg_str = require('fs').readFileSync('/dev/stdin', 'UTF-8')
const arg_array = arg_str.split(' ')

let result = []
const H = parseInt(arg_array[0])
const W = parseInt(arg_array[1])
const A = parseInt(arg_array[2])
const B = parseInt(arg_array[3])

let pos = 0

let total = (new Array(W)).fill(0)

let err = false
for(let i=0;i<H;i++){
    const item = (new Array(W)).fill(0)
    if(total[pos] < A ){
        item[pos] = 1
        total[pos]++
    }else{
        pos++
        if(pos > W - 1){
          console.log('No')
            err = true
          break
        }
        item[pos] = 1
        total[pos]++
    }
    result.push(item)
}

if(!err){
  result.map(x=>console.log(x.join('')))
}