#include <iostream>
#include <map>
using namespace std;

#ifdef _MSC_VER
#define __typeof__ decltype
#endif

#define ITER(c)         __typeof__((c).begin())
#define FOREACH(it, c)  for (ITER(c) it=(c).begin(); it != (c).end(); ++it)
#define MAX(p1,p2)      (((p1)>(p2))?(p1):(p2))

map<int,int> m;

int main(){
    int n, max = 0;
    while(cin >> n) m[n]++;
    FOREACH(it,m) max = MAX(max, it->second);
    FOREACH(it,m) if(it->second == max) cout << it->first << endl;
    return 0;
}