#include<stdio.h>
#include<stdlib.h>

int compareq(const void*a, const void*b)
{
	return *(int*)a > *(int*)b ? 1 : *(int*)a == *(int*)b ? 0 : -1;
}

int main()
{
	int numbers[101], i = 0, maxnum[101];
	while (scanf("%d", &numbers[i++]) != EOF);
	qsort(numbers, i, sizeof(int), *compareq);
	int n, cnt = 0, max = 0, j = 0;
	for (n = 0; n < i; n++)
	{
		if (numbers[n] == numbers[n - 1])cnt++;
		else
		{
			if (cnt > max)
			{
				int s = 0;
				while (1)
				{
					maxnum[s++] = 0;
					if (s == 100)break;
				}
				maxnum[0] = n - 1;
				max = cnt;
				cnt = 0;
				j = 0;
			}
			else if (cnt == max)
			{
				maxnum[j++] = n - 1;
				cnt = 0;
			}
			else;
		}
	}
	j = 0;
	while (maxnum[j])
	{
		printf("%d\n", maxnum[j]);
		j++;
	}
	return 0;
}