#include <string>
#include <vector>
#include <iostream>
#include <complex>
#include <map>
using namespace std;

typedef vector<int> VI;
#define REP(i,s,t) for(int i=(s);i<(t);i++)

int main() {
    int i;
    map<int, int> count;
    while (cin >> i){
        map<int, int>::iterator it = count.find(i);
        if (it!=count.end()){
            count[i] += 1;
        } else {
            count[i] = 1;
        }
    }
    int mode = 0;
    VI m;
    for (auto it = count.cbegin(); it != count.cend(); ++it){
        if (mode < it->second){
            mode = it->second;
            m.clear();
            m.push_back(it->first);
        }else if (mode == it->second){
            m.push_back(it->first);
        }

    }
    std::sort(m.begin(), m.end());
    for (int num:m){
        cout << num << endl;
    }
    return 0;
}