H,W,A,B=$<.read.split.map(&:to_i)
# H,W,A,B=[7,4,2,3]

arr = Array.new(H) { Array.new(W,0) }
line = [1] * A

B.times do |i|
    arr[i][0..A-1] = line
end
line = [1] * (W-A)
(H-B).times do |i|
    arr[B+i][A..W-1] = line
end

puts arr.map {|l| l.join}