N = gets.to_i SIZE = 1000 eyes = Array.new(SIZE, 0) (1..N).each do s = gets.chomp.size - 2 eyes[s] += 1 end max_eye = 0 last_index = 0 (0..SIZE - 1).each do |index| eye = eyes[index] eye < max_eye and next max_eye = eye last_index = index end puts last_index