-- http://www.lua.org/pil/11.4.html
List = {}
function List.new()
    return setmetatable({first = 0, last = -1}, {__index = List})
end

function List.clone(origin)
    local child = List.new()
    for k,v in pairs(origin) do
        child[k] = v
    end
    return child
end

function List:count()
    return self.last - (self.first - 1)
end

function List:pushleft(value)
    local first = self.first - 1
    self.first = first
    self[first] = value
end

function List:pushright(value)
    local last = self.last + 1
    self.last = last
    self[last] = value
end

function List:popleft()
    local first = self.first
    if first > self.last then error("list is empty") end
    local value = self[first]
    self[first] = nil -- to allow garbage collection
    self.first = first + 1
    return value
end

function List:popright()
    local last = self.last
    if self.first > last then error("list is empty") end
    local value = self[last]
    self[last] = nil -- to allow garbage collection
    self.last = last - 1
    return value
end

---
local q = List.new()
local N = io.read("n")
local last_is_right
for i=1,N do
    if i % 2 == 1 then
        q:pushright(io.read("n"))
        last_is_right = true
    else
        q:pushleft(io.read("n"))
        last_is_right = false
    end
end
local b = {}
if last_is_right then
    for i=1,N do
        table.insert(b, q:popright())
    end
else
    for i=1,N do
        table.insert(b, q:popleft())
    end
end
print(table.concat(b, " "))