import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; import java.util.Map.Entry; public class Solution { public static void main(String[] args) { Scanner in = new Scanner(System.in); int n = in.nextInt(); int[] types = new int[n]; for(int types_i=0; types_i < n; types_i++){ types[types_i] = in.nextInt(); } // your code goes here HashMap mymap=new HashMap<>(); for(int i=0;i> myset=mymap.entrySet(); // for(Object s:myset) // System.out.println() List> mylist=new ArrayList<>(myset); Collections.sort(mylist,new Comparator>() {public int compare(Map.Entry o1, Map.Entry o2){ if(o1.getValue()>o2.getValue()) return -1; //else if(o1.getValue()