-- 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)] . replicate 3 . zipWith ($) [sum, maximum, minimum] . replicate 3 . map fst, id] . replicate 2 . (`zip` "ABC") . map ((+ 0) . read) . words