# coding: utf-8
count = {}
while line = gets
  n = line.to_i
  if count.key?(n)
    count[n] +=  1
  else
    count[n] = 1
  end
end

# 最大値操作
max_array = []
max_value = 0
count.each do |k,v|
  if max_value < v
    max_value = v
    max_array.clear
    max_array << k
  elsif max_value == v
    max_array << k
  end
end

puts max_array.sort.join("\n")