import Data.List import Data.Ord main = getLine >> getLine >>= putStrLn . head . maximumBy (comparing length) . group . sort . words