import Data.List
main = getContents >>= putStrLn . head . tail . sort . lines