//https://onlinejudge.u-aizu.ac.jp/challenges/sources/PCK/Prelim/0028?year=2004

#include <bits/stdc++.h>

using namespace std;

int main() {
    int a;
    map<int, int> mp;

    int mx = 0;
    while (cin >> a) {
        mp[a]++;
        mx = max(mx, mp[a]);
    }

    for (auto m : mp) {
        if (m.second == mx) {
            cout << m.first << endl;
        }
    }
    return 0;
}

/*
 *
 */
