#include<iostream>
#include<algorithm>
using namespace  std;

int main()
{
	int bin[101];
	for (int i = 0; i < 101; i++)bin[i] = 0;
	int n;
	while (cin >> n)bin[n]++;
	int ans = 0;
	for (int i = 0; i < 101; i++)
	{
		ans = max(ans, bin[i]);
	}
	for (int i = 0; i < 101; i++)
	{
		if (bin[i] == ans)
		{
			cout << i << endl;
		}
	}
	return 0;
}