import Data.Functor( (<$>))
import Data.Char( isLower, isUpper, toUpper, toLower)

main = do
    str <- getLine
    let
	toggleCase c
	    |	isLower c = toUpper c
	    |	isUpper c = toLower c
	    |	otherwise = c

    putStrLn $ toggleCase <$> str

