import Data.Char

flipCase = map flipChar where
    flipChar c | isLower c = toUpper c
               | isUpper c = toLower c
               | otherwise = c

main =
    getLine >>= putStrLn . flipCase