reverse' :: [a] -> [a]
reverse' [] = []
reverse' (x:xs) = reverse' xs ++ [x]

printList :: Show a => [a] -> IO ()
printList = putStrLn.unwords.(map show)

main :: IO ()
main = do
    n   <- getLine >>= \n -> return (read n :: Int)
    lst <- getLine >>= return.(map (\m -> read m :: Int)).words
    printList $ reverse' lst
