-- Try AtCoder
-- author: Leonardone @ NEETSDKASU

main = putStrLn . unwords . solve . tail . words =<< getContents

odds o e []     = (o, e)
odds o e (x:xs) = evens (x:o) e xs

evens o e []     = (o, e)
evens o e (x:xs) = odds o (x:e) xs

solve a = ans where
    n = length a
    (o, e) = odds [] [] a
    ans = if even n then e ++ reverse o else o ++ reverse e
