h, w, a, b = gets.strip.split.map(&:to_i)

result = Array.new(h) { [0]*w }

h.times do |i|
  a.times do |aa|
    result[i][(i+aa)%w]=1
  end
end

h.times do |i|
  r = 0
  w.times do |j|
    r += result[i][j]
  end
  if r!=a && r!=w-a
    puts 'No'
    exit
  end
end

w.times do |i|
  r = 0
  h.times do |j|
    r += result[j][i]
  end
  if r!=b && r!=h-b
    puts 'No'
    exit
  end
end

result.each do |r|
  puts r.join('')
end

