#include <iostream>
#include <map>

using namespace std;

int main() {
    map<int, int> map;
    int a, max_ = 0;
    while (cin >> a) {
        if (map.find(a) != map.end()) {
            map[a] += 1;
            max_ = max(max_, map[a]);
        } else {
            map[a] = 1;
        }
    }

    for (auto a_ : map) {
        if (a_.second == max_) {
            cout << a_.first << endl;
        }
    }
}
