import Data.Char
main :: IO ()
main = putStrLn . swapCase =<< getLine where
  swapCase = map swapcase'
  swapcase' c | isLower c = toUpper c
              | isUpper c = toLower c
              | otherwise = c