h, w, a, b = gets.split(" ").map(&:to_i)
d_array = Array.new(h) { Array.new(w, 0) }
result = true
a_sum = Array.new(h, 0)
b_sum = Array.new(w, 0)

h.times do |i|
  w.times do |j|
    if a != 0 && b != 0
      if b_sum[j] < b && a_sum[i] < a
        d_array[i][j] = 0
        a_sum[i] += 1
        b_sum[j] += 1
      else
        d_array[i][j] = 1
      end
    elsif a == 0
      if b_sum[j] < b
        d_array[i][j] = 0
        b_sum[j] += 1
      else
        d_array[i][j] = 1
      end
    elsif b == 0
      if a_sum[i] < a
        d_array[i][j] = 0
        a_sum[i] += 1
      else
        d_array[i][j] = 1
      end
    end
  end
end

if a != 0
  a_sum.each.with_index do |sum, i|
    result = false unless sum >= b
  end
end

if b != 0
  b_sum.each.with_index do |sum, i|
    result = false unless sum >= a
  end
end

if result
  d_array.each do |array|
    array.each do |num|
      print num
    end
    print "\n"
  end
else
  puts "No"
end