import io.StdIn.readLine

object Main extends App {
  val ns = Array.ofDim[Int](101)
  Iterator.continually(readLine)
    .takeWhile(_ != null)
    .foreach(e => {
      val n = e.toInt
      ns(n) += 1
    })
  val max = ns.max
  for(i <- 0 to 100 if ns(i) == max) println(i)
}
