program main
  implicit none
  integer i, H, W, A, B
  integer,allocatable :: X1(:),X2(:)
  read(*, *)H, W, A, B
  allocate(X1(W))
  allocate(X2(W))
  !read(*, *) (L(i), i = 1,N)
  X1 = 0
  X2 = 1
  X1(1:A) = 1
  X2(1:A) = 0
  do i = 1,H
    if (i > B) then
      write(*, *) X2
    else
      write(*, *) X1
    end if
  end do
end program main
