file = $stdin
lines = file.readlines
file.close

groupedInput = lines.group_by{|i| i % 100}
tmpMax = groupedInput.max_by{|_, val| val.length}
maxNum = groupedInput.select{|key, val| val.length == tmpMax[1].length}.keys

maxNum.each do |i|
	p i.to_i
end 