#include <bits/stdc++.h>

using namespace std;
typedef long long ll;
double N;
ll M;
string s;
vector<ll > input1;  
vector<vector <ll > > input2;

int main(){

    vector<pair<int, int > > v;
    for(int i = 0; i < 100; i++){
        v.push_back(make_pair(0, i+1));
    }

    while(1){
        int x;
        cin >> x;
        if(cin.eof()) break;
        //if(x == -1) break;
        v[x-1].first++;
    }

    sort(v.rbegin(),v.rend());

    vector<int > result;
    int temp = v[0].first;
    for(int i = 0; i < 100; i++){
        //cout << v[i].second << endl;
        result.push_back(v[i].second);
        if(v[i].first != v[i + 1].first){
            break;
        }
    }

    sort(result.begin(),result.end());
    for(int i = 0; i < result.size(); i++){
        cout << result[i] << endl;
    }
} 
