n=gets.to_i l=gets.split.map &:hex p l.uniq.max_by{|i|[l.count(i),i]}