#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int y[100000000], n, maxv; vector<int>a;
int main() {
	while (cin >> n) {
		y[n]++;
	}
	for (int i = 0; i < 100000000; i++) {
		maxv = max(maxv, y[i]);
	}
	for (int i = 0; i < 100000000; i++) {
		if (y[i] == maxv) { cout << i << endl; }
	}
}