numarry = Array.new(100,0)

x = gets
until x.nil?
 y = x.chomp.to_i
 indexy = y - 1
 numarry[indexy] += 1
 x = gets
end

arraymax = numarry.max

arryindex = numarry.each_index.select{|i| numarry[i] == arraymax}

k = 0
while k < arryindex.length
 truenum = arryindex[k] + 1
 puts truenum
 k += 1
end

