import qualified Data.Char as Char import qualified Data.List as List import Data.Array import Data.Maybe import Control.Applicative import Text.Printf max_digit xs = foldr1 f (zip xs [0..]) where f(x, xi) (m, mi) = if x > m then (x, xi) else (m, mi) swap i j xs = map f (zip xs [0..]) where f (x, k) | k == i = xs !! j | k == j = xs !! i | otherwise = x main = do ns <- getLine let (_, i) = max_digit ns let ns' = swap 0 i ns putStrLn ns'