# N = gets.chomp.to_i
H, W, A, B = gets.chomp.split.map(&:to_i)
# S = gets.chomp.chars

0.upto(H-1).each do |h|
  row = []
  0.upto(W-1).each do |w|
    if (w <= A-1) && (h <= B-1)
      row << 1
    elsif (w > A-1) && (h <= B-1)
      row << 0
    elsif (w <= A-1) && (h > B-1)
      row << 0
    else # w > A-1 && h > B-1
      row << 1
    end
  end
  print row.join(" ") + "\n"
end

