//#pragma GCC optimize(2)
//#pragma GCC optimize(3)
#include<bits/stdc++.h>
#define fo(x,a,b) for(register int x=a;x<=b;x++)
#define dfo(x,a,b) for(register int x=a;x>b;x--)
using namespace std;
int a[1000],x,n,m;
char c;
int main ()
{
	//、、freopen("modeval.in","r",stdin);
	//freopen("modeval.out","w",stdout);
	do
	{
		scanf("%d",&x);
		if (getchar()!='\n') break;
		a[x]++;
		m=max(a[x],m);
	}while (true);
	fo(i,1,100)
	{
		if (a[i]==m)
		{
			printf("%d\n",i);
		}
	}

	return 0;
}


