#include<iostream>
using namespace std;
int main() {
    int a[100 + 1] = {0};
    int n;
    int Max = 0;
    while (cin >> n) {
        a[n]++;
        Max = Max < n ? n : Max;
    }
    int ans[100] = {0};
    int cnt = 0;
    int id[100] = {0};
    for (int i = 1; i <= Max; i++) { //~a[Max]
        if (ans[0] < a[i]) {
            ans[0] = a[i]; id[0] = i;
            for (int j = 1; j <= cnt; j++) {
                id[j] = 0;
            }
            cnt = 0;
        } else if (ans[0] == a[i]) {
            id[++cnt] = i;
        }
    }
    for (int i = 0; i < Max; i++) {
        if (id[i] != 0) {
            cout << id[i] << endl;
        }
        else break;
    }
    
}

