import Control.Applicative

import Data.Char
    (isLower, isUpper, toLower, toUpper)

convert :: Char -> Char

convert char
    | isLower char
        = toUpper char
        
    | isUpper char
        = toLower char
        
    | otherwise
        = char

main :: IO ()

main
    = putStrLn =<< map convert <$> getLine