# 入力された値を受け取る # N の値は無視してもらって OK N = gets.chomp.to_i Ls = gets.chomp.split.map(&:to_i) pp Ls.tally.sort_by {[_2, _1] }.last.first