using System; using System.Collections.Generic; using System.IO; using System.Linq; class Solution { static void Main(String[] args) { int n = Convert.ToInt32(Console.ReadLine()); string[] types_temp = Console.ReadLine().Split(' '); int[] types = Array.ConvertAll(types_temp,Int32.Parse); // your code goes here int[] counts = new int[n]; foreach(int t in types) counts[t-1]++; int most = 0; for(int i = 1; i < n; i++) if(counts[i] > counts[most]) most = i; Console.WriteLine(most + 1); } }