#include using namespace std; int main(){ int n; cin >> n; map m; vector types(n); for(int types_i = 0; types_i < n; types_i++){ cin >> types[types_i]; } for(int i =0; i< n; i++) { if(m.count(types[i]) > 0) { map::iterator it = m.find(types[i]); it->second += 1; } else { m.insert(pair(types[i],1)); } } map::iterator it2; int max = 0, value = 0; for(it2 = m.begin(); it2 != m.end(); it2++) { if(it2->second > max) { max = it2->second; value = it2->first; } } cout<