#include <stdio.h>

int main()
{
	int val[100], val2[100], k, i, j, t, s;

	i = 0;
	while(scanf("%d", &val[i]) != EOF){
		for (j = 0; j <= i; j++){
			if(val[j] > val[i]){
				t = val[j];
				val[j] = val[i];
				val[i] = t;
			}
		}

		i++;
	}

	i = 0;
	j = 1;
	t = 0;
	k = 0;
	s = 1;
	while(val[i] != '\0'){
		if (t == val[i]) j++;
		else{
			if(s == j) {k++; val2[k] = val[i-1];}
			else if(s < j) {s = j; k = 0; val2[k] = val[i-1];}
			t = val[i]; j = 1;
		}

		i++;
	}

	i = 0;
	while(val2[i] != '\0'){
		printf("%d\n", val2[i]);
		i++;
	}

	return 0;
}