import Data.Char
import Control.Applicative
main = do
   getLine >>=  (putStrLn . cChange)

cChange :: String -> String
cChange = map aux
  where
    aux :: Char -> Char
    aux c 
      | elem c ['a'..'z'] = toUpper(c)
      | elem c ['A'..'Z'] = toLower(c)                        
      | otherwise = c                      