#include <stdio.h>

int main(void)
{
	int i, j = 0;
	int num[10];
	int n[100];
	int max;
	
	for (i = 0; i < 10; i++){
		num[i] = 0;
	}
	
	i = 0;
	
	while ( scanf("%d", &n[i]) != EOF){
		
		switch (n[i]){
			case 0:
			num[0]++;
			break;
			
			case 1:
			num[1]++;
			break;
			
			case 2:
			num[2]++;
			break;
			
			case 3:
			num[3]++;
			break;
			
			case 4:
			num[4]++;
			break;
			
			case 5:
			num[5]++;
			break;
			
			case 6:
			num[6]++;
			break;
			
			case 7:
			num[7]++;
			break;
			
			case 8:
			num[8]++;
			break;
			
			case 9:
			num[9]++;
			break;
		}
		i++;
	}
	
	max = num[0];
	
	for (i = 1; i < 10; i++){
		if (max < num[i]){
			max = num[i];
		}
	}
	for (j = 0; j < 10; j++){
		if (max == num[j]){
			printf("%d\n", j);
		}
	}
	
	return (0);
}