#include <sstream>
#include <string>
#include <vector>
#include <map>
#include <algorithm>
#include <iostream>
#include <utility>
#include <set>
#include <cctype>
#include <queue>
#include <stack>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
using namespace std;
#define INF 100000000
#define MAXN 110
typedef long long ll;

int a[MAXN];

int main(void) {
    int cur, b;
    while (cin >> b) {
        a[cur++] = b;
    }
    map<int, int> m;
    for (int i = 0; i <= cur; i++) {
        m[a[i]]++;
    }
    // maxを見つける
    int ma = 0;
    for (int i = 0; i <= m.size(); i++) {
        ma = max(m[i], ma);
    }
    // maxの数を探す
    for (int i = 0; i <= m.size(); i++) {
        if (m[i] == ma) {
            cout << i << endl;
        }
    }
    return 0;
}