import java.util.HashMap; import java.util.Map; import java.util.Scanner; public class MigratoryBirds { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int number = scanner.nextInt(); int types[] = new int[number]; Map map = new HashMap(); for (int i=0;i entry: map.entrySet()){ if (entry.getValue()>maxValue){ maxValue = entry.getValue(); maxIndex = entry.getKey(); } } System.out.println(maxIndex); scanner.close(); } }