#include <iostream>

using namespace std;

int main(void){
	int times[10];
	int i, n;
	int max;

	for(i=0;i<10;i++){
		times[i] = 0;
	}

	while(cin >> n){
		times[n]++;
	}

	max = 0;
	for(i=0;i<10;i++){
		if(max < times[i]){
			max = times[i];
		}
	}

	for(i=0;i<10;i++){
		if(max == times[i]){
			cout << i << endl;
		}
	}
	return 0;
}