key = {}
while n = gets
  n = n.to_i
  unless key[n]
    key[n] = 0
  end
  key[n] += 1
end

max = 0
ans = []
key.each{|k, v|
  if max < v
    ans = [k]
    max = v
  elsif max == v
    ans << k
  end
}

ans.sort.each{|i|
  puts i
}