program prob3
    implicit none
    integer::n, i, j
    integer, allocatable::a(:),b(:)
    read(*,*) n
    allocate(a(n),b(n))
    read(*,*) a

    if(mod(n,2) == 0)then
        do i = n,2,-2
            b(n/2-i/2+1) = a(i)
        end do
        do i = 1, n, 2
            b(n/2+(i+1)/2) = a(i)
        end do
    else
        do i = n, 1, -2
            b(n/2-i/2+1) = a(i)
        end do
        do i = 2, n-1, 2
            b(n/2 + i/2 + 1) = a(i)
        end do
    end if
    write(*,*) b
    stop
end program