import Data.Char

main = interact $ solve
  where
    solve [] = []
    solve (x:xs) = (f x):solve xs
    f x | isLower x = toUpper x
        | isUpper x = toLower x
        | otherwise = x
      where
        isLower x = x `elem` ['a'..'z']
        isUpper x = x `elem` ['A'..'Z']

