import Data.Char
main = getLine >>= putStrLn . map switch
             where switch ch
                      | isLower ch = toUpper ch
                      | isUpper ch = toLower ch
                      | otherwise  = ch