-- yukicoder My Practice -- author: Leonardone @ NEETSDKASU main = interact $ unlines . map (return . snd) . foldl1 (flip ((zip [0 .. ] .) . map . (maybe '@' id .) . (. fst) . flip lookup)) . zipWith ($) [(`zip` "XYZ") . zipWith ($) [(!! 1), foldl1 (-) ,(!! 2)] . repeat . zipWith ($) [sum, maximum, minimum] . repeat . map fst, id] . repeat . (`zip` "ABC") . map ((+ 0) . read) . words