#include <bits/stdc++.h>
using namespace std;

int main(void){
    int a,tmp=-1,count=0;
    std::deque<int> deq;
    deque<int> mode;
    while (cin>>a) {
        deq.emplace_back(a);
    }
    for (int i=0;i<deq.size();i++) {
        for (int j=i+1;j<deq.size();j++) {
            if (deq[i]==deq[j]) {
                count++;
            }
        }
        if (tmp<count) {
            mode.clear();
            tmp=count;
            mode.emplace_back(deq[i]);
        } else if (tmp==count) {
            mode.emplace_back(deq[i]);
        }
        count=0;
    }
    sort(mode.begin(),mode.end());
    for (int k=0;k<mode.size();k++) {
        cout<<mode[k]<<endl;
    }
}

