#include <bits/stdc++.h>
#define PI 3.14159265359
using namespace std;

int main() {
	vector<vector<int> > v(100, vector<int>(2, 0));
	for (int i = 0; i < 100; i++) {
		v.at(i).at(1) = i + 1;
	}

	int n;
	while (cin >> n) {
		v.at(n - 1).at(0)++;
	}

	sort(v.begin(), v.end());
	reverse(v.begin(), v.end());
	//cout << v.at(0).at(1) << endl;
	//cout << v.at(1).at(1) << endl;
	//cout << v.at(2).at(1) << endl;

	vector<int> v2(100);
	int max = v.at(0).at(0);
	for (int i = 0; i < 100; i++) {
		if (v.at(i).at(0) == max) {
			v2.at(i) = v.at(i).at(1);
		}
	}

	sort(v2.begin(), v2.end());
	for (int i = 0; i < 100; i++) {
		int n = v2.at(i);
		if (n) cout << n << endl;
	}
}
