module Main where
--import Debug.Trace
import Data.List
import Data.Char
import Data.Array
import Data.Maybe
import Data.Ord
import Control.Monad

solve :: String -> String
solve [] = []
solve (c:cs)
    | isAsciiUpper c = toLower c:solve cs
    | otherwise      = toUpper c:solve cs

main :: IO() 
main = do
    line <- getLine
    putStrLn (solve line)

