import scala.io.Source.stdin

object Main {
  val v = new Array[Int](101)
  def main(args:Array[String]) =  {
    var i = 0
    stdin.getLines.foreach { a => v(a.toInt) += 1 }
    v.foreach { e =>
      if(e == v.max) println(i)
      i += 1
    }
  }
}