module Main where

import Data.Char

main :: IO ()
main =  putStrLn . map toggleCase =<< getLine

toggleCase :: Char -> Char
toggleCase c
  | isLower c = toUpper c
  | isUpper c = toLower c
  | otherwise = c