import java.util.*; public class birds { public static void main(String[] args) { Scanner kb = new Scanner(System.in); HashSet lel = new HashSet(); HashMap xd = new HashMap(); int l = kb.nextInt(); for(int i = 0; imax){ max = xd.get(k); n = k; } for(Integer k: lel) if(xd.get(k)==max && n>k){ max = xd.get(k); n = k; } System.out.println(n); } }