import Data.List.Split

toInt :: String -> Int
toInt = read :: String -> Int

doABCswap :: [Int] -> [Int]
doABCswap l = last l : init l

showAnswer :: [Int] -> String
showAnswer (x:[]) = show x
showAnswer (x:xs) = show x ++ " " ++ showAnswer xs 

main = do
  s <- getLine
  putStrLn $ showAnswer . doABCswap $ map toInt (splitOn " " s)