def main(argv)
  (h, w, a, b) = gets.chomp.split(' ').map(&:to_i)

  s = []

  (h - b).times do |y|
    s[y] = [0] * a + [1] * (w - a)
  end

  b.times do |y|
    s[y + (h - b)] = [1] * a + [0] * (w - a) 
  end

  puts s.map{|row| row.map(&:to_s).join('')}.join("\n")
end

if self.to_s == 'main' then
  main(ARGV)
end