{-# LANGUAGE PartialTypeSignatures #-}
{-# LANGUAGE LambdaCase #-}
module Main (main) where

import Control.Monad
import qualified Data.ByteString.Char8 as C8

main :: IO ()
main = readString >>= output . solve

solve :: String -> _
solve = \case
  "ABC" -> "ARC"
  "ARC" -> "ABC"

output :: _ -> IO ()
output = putStrLn

readString :: IO String
readString = C8.unpack <$> C8.getLine