    program sample
    implicit none
    character(100)::s,t
    integer(8) :: i,j,k,m,n
    integer(8)::a,b,c,d
    integer(8),allocatable::x(:),y(:)
  
    read(*,*) n
    allocate(x(n),y(n))
    read(*,*)x
    if(mod(n,2)==0)then
        do i=1,n/2
            y(i)=x(n+2-2*i)
            y(i+n/2)=x(i*2-1)
        end do
    else
        do i=1,n/2+1
            y(i)=x(n+2-2*i)
        end do
        do i=1,n/2
            y(n/2+1+i)=x(i*2)
        end do
    end if
    write(*,*)y

    stop
end program sample
  

