#include <iostream>
using namespace std;

int main() {
    int x[1000] = {};
    int a;
    while(cin >> a) {
        x[a]++;
    }

    int mx = -1, mx_count = 0;
    for (int i = 0; i < 101; i++) {
        if (mx_count < x[i]) {
            mx = i;
            mx_count = x[i];
        }
    }
    for (int i = 0; i < 101; i++) {
        if (mx_count == x[i])
            cout << i << endl;
    }
}

