import Control.Applicative
import Control.Monad
import Data.Array
import Data.Array.ST
import Data.Char
import Data.List
import qualified Data.Map as M
import qualified Data.Set as S
import Text.Printf

readInts :: IO [Int]
readInts = map read . words <$> getLine

main :: IO ()
main = do
    s <- getLine
    putStrLn $ map swapCase s

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

