conv :: String -> String conv = fmap f . reverse where f '<' = '>' f _ = '<' main :: IO () main = putStrLn . conv =<< getLine