import           Control.Applicative
import           Control.Monad
import qualified Data.ByteString.Char8 as B
import           Data.Char

swap :: Char -> Char
swap c
    | isLower c = toUpper c
    | otherwise = toLower c

main :: IO ()
main = do
    xs <- B.getLine
    B.putStrLn $ B.map swap xs

