#include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define rep(i,n) for(int i=0;i=0;i--) #define DREP(i,n) for(int i=n;i>0;i--) #define Rep(i,m,n) for(int i=m;i vi; typedef vector > vvi; typedef pair pdd; typedef pair pii; const double pi=acos(-1.0); double rad(double t){return t*pi/180.0;} int main(){ int n,count[10]={},num=0,in; scani(n); REP(i,n){scani(in);count[in]++;} REP(i,n)num = max(num,count[i]); DREP(i,n){ if(num==count[i]){ printi(i);LF;break; } } return 0; }