program OE1G
    implicit none
    integer(8)::n,i,count
    integer(8),allocatable,dimension(:)::A,output

    read(5,*)n
    allocate(A(n))
    allocate(output(n))
    read(5,*)(A(i),i=1,n)

    if(mod(n,2)==0)then
        output(1)=A(n)
        count=2
        do i=1,N/2-1
            output(count)=A(n-2*i)
            count=count+1
        end do

        do i=1,N/2
            output(count)=A(2*i-1)
            count=count+1
        end do

    else
        output(1)=A(n)
        count=2
        do i=1,N/2
            output(count)=A(n-2*i)
            count=count+1
        end do

        do i=1,N/2
            output(count)=A(2*i)
            count=count+1
        end do
    end if

    write(*,*)output(:)
    
end program OE1G