#include <cstdio>
#include <vector>
#include <algorithm>
using namespace std;

#define NOT_FOUND -1

int GetContainsElement(const vector<pair<int, int>> v, int target)
{
    int i = 0;
    for (vector<pair<int, int>>::const_iterator it = v.begin(); it != v.end(); it++) {
        if (it->first == target) {
            return i;
        }
        i++;
    }

    return NOT_FOUND;
}

int GetMostfrequentlyNumber(const vector<pair<int, int>> v)
{
    int ret = v[0].second;
    for (vector<pair<int, int>>::const_iterator it = (v.begin() + 1); it != v.end(); it++) {
        if (ret < it->second) {
            ret = it->second;
        }
    }

    return ret;
}

int main()
{
    int n = 0;
    vector<pair<int, int>> vec;

    while (scanf("%d", &n) != EOF) {
        int idx = GetContainsElement(vec, n);
        if (NOT_FOUND == idx) {
            vec.push_back(make_pair(n, 0));
        }
        else {
            vec[idx].second++;
        }
    }

    sort(vec.begin(), vec.end());
    int mostFrequently = GetMostfrequentlyNumber(vec);

    for (vector<pair<int, int>>::const_iterator it = vec.begin(); it != vec.end(); it++) {
        if (mostFrequently == it->second) {
            printf("%d\n", it->first);
        }
    }

    return 0;
}

