#include <cstdio>
#include <cstdlib>
#include <iostream>

using namespace std;

const int N = 100;

int n[N];
struct number {
	int cs;
	int value;
}num[N];

int cmp(const void *a, const void *b) {
	return *(int *)a - *(int *)b;
}

int cmp1(const void *a, const void *b) {
	number *c = (number *)a;
	number *d = (number *)b;
	if (c->cs != d->cs) return d->cs - c->cs;
	return c->value - d->value;
}

int main() {
	int k = 0, i = 0, maxs = -1;
	while (scanf("%d", &n[i++]) != EOF);//注意，i&#20540;比&#36755;入的整数个数大1 
	qsort(n, --i, sizeof(int), cmp);//i&#20540;要&#20943;一 
	num[k].cs = 1;
	num[k].value = n[0];
	for (int j=1; j<i; ++j) {//&#32479;&#35745;&#27599;个数出&#29616;的个数，并保存&#35813;数及其个数 
		if (num[k].value == n[j]) ++num[k].cs;
		else {
			if (num[k].cs > maxs) maxs = num[k].cs;
			++k;
			num[k].cs = 1;
			num[k].value = n[j];
		}
	}
	if (num[k].cs > maxs) maxs = num[k].cs;
	qsort(num, k+1, sizeof(number), cmp1);
	for (int j=0; j<=k; ++j) {//&#36755;出答案 
		if (num[j].cs == maxs) printf ("%d\n", num[j].value);
		else break;
	}
	return 0;
}