reverse' :: [a]->[a]

reverse' [] = []

reverse' list = 
   reverse' (tail list) ++ [head list]

print_list :: Show a => [a] -> IO ()

print_list list = do
  let h = head list
  putChar ' '
  putStr $ show h

  if (length list) >= 2 then
    print_list $ tail list
  else
    putChar '\n'

main = do
  n <- getLine
  str <- getLine
  let a_list = map (read :: String->Int) $ words str
  let r_list = reverse' a_list
  let h = head r_list

  putStr $ show h
  if (length r_list) >= 2 then
    print_list $ tail r_list
  else
    putChar '\n'