#include<iostream>
#include<vector>

using namespace std;

int main() {
	int num[101] = { 0 };
	int a;
	while (cin >> a) {
		num[a] += 1;
	}
	int max = -1;
	vector<int> vec;
	for (int i = 0; i <= 100; i++) {
		if (num[i] == max) {
			vec.push_back(i);
		}

		if (num[i] > max) {
			max = num[i];
			vec.clear();
			vec.push_back(i);
		}
	}
	for (int j = 0; j < vec.size(); j++) {
		cout << vec[j] << endl;
	}
}
