import Control.Applicative

type Problem = [Int]

type Result = [Int]

solve :: Problem -> Result

solve
    = reverse

input :: IO Problem

input
    = do
        getLine
        xs <- map read.words <$> getLine
        return xs

output :: Result -> IO ()

output xs
    = putStrLn $ init $ concat [show x ++ " " | x <- xs]
    
main :: IO ()

main = output =<< solve <$> input