import Control.Monad
import Control.Applicative
import Data.Functor
import Data.List
import Data.List.Split
import Data.Char
import Data.Array.IO

readInt = read :: String -> Int
getInt = readLn :: IO Int
getInts = map readInt . words <$> getLine
sjoin :: (Show a) => [a] -> String
sjoin = unwords . map show
cond :: a -> a -> Bool -> a
cond t f c = if c then t else f
-- end of templete



main = do
    arr <- newArray (1, 100) 0 :: IO (IOUArray Int Int)
    map readInt . lines <$> getContents >>= mapM_ (\a -> (+1) <$> readArray arr a >>= writeArray arr a)
    list <- getAssocs arr
    let maxv = maximum $ map snd list
    mapM_ print $ map fst $ filter ((==maxv) . snd) list
    return ()