哈希表
#include <iostream>
#include <cstring>
#include <algorithm>
using namespace std;
const int N = 10010;
int n;
int q[N];
int main()
{
cin >> n;
while (n --)
{
int x;
cin >> x;
q[x] ++;
}
int res = 0;
for (int i = 1; i < N; i ++)
{
if (q[i] > q[res]) res = i;
}
cout << res << endl;
return 0;
}