import qualified Data.ByteString.Char8 as B

main :: IO ()
main = do
  s <- B.getLine
  B.putStrLn $ solve s

solve :: B.ByteString  -> B.ByteString
solve s = case B.length s of
  2 -> s
  3 -> B.reverse s