let (h, w, a, b) = Scanf.sscanf (read_line ()) "%d %d %d %d" @@ fun h w a b -> (h, w, a, b)

let () =
  Array.iter (fun arr ->
    Array.iter print_int arr;
    print_newline ()
  ) @@ Array.init h @@ fun i -> Array.init w @@ fun j -> 
    if i < h - a then
      if j < w - b then 1 else 0
    else
      if j < w - b then 0 else 1