arry = [0]
arry.clear()

while line = gets.chomp
  if( line.empty? == false )
    num = line.to_i()
    if( num >= 1 ) && (num <= 100)
      arry.push( num )
    else
    end
  else
  end
  if( arry.length >100 )
    break;
  end
end

most_appear_val = [0]
appear_cnt = 0
for i in 1..100 do
  count = arry.count(i)
  if( appear_cnt < count )
    most_appear_val.clear()
    most_appear_val.push(i)
    appear_cnt = count
  elsif( appear_cnt == count )
    most_appear_val.push(i)
  end
end

puts most_appear_val