import qualified Data.Map as Map

solve :: String -> String
solve str = map convFunc str
	where
		convMap = Map.fromList $ (zip ['a'..'z'] ['A'..'Z']) ++ (zip ['A'..'Z'] ['a'..'z'])
		convFunc c = case Map.lookup c convMap of
			Just value -> value
			Nothing -> c

main = do
	line <- getLine
	putStrLn $ solve line