program AGC38_A
  integer(8)::H,W,A,B
  integer(8),allocatable::S(:,:)
  read(*,*)H,W,A,B
  allocate(S(H,W))
  S=0
  S(B+1:H,1:A)=1
  S(1:B,A+1:W)=1
  do i=1,H
     write(*,"(1000I1)")S(i,:)
  end do
end program AGC38_A