#include <iostream>
#include <vector>
#include <algorithm>

#define INPUT_FROM_FILE (0) 
#if INPUT_FROM_FILE
#include <fstream>
#endif

int main(int argc, char **argv){
	int n;
	std::vector<int> hist(101, 0);

#if INPUT_FROM_FILE
	std::ifstream ifs("test.txt");
	//FILE *fp = fopen("test.txt", "r");
#endif

#if INPUT_FROM_FILE
	while(ifs >> n){
#else
	while(std::cin >> n){
#endif
		hist[n]++;
	}

	int max_val = 0;
	for(int i = 1; i < hist.size(); i++){
		max_val = std::max(max_val, hist[i]);
	}
	
	for(int i = 1; i <hist.size(); i++){
		if(hist[i] == max_val){
			std::cout << i << std::endl;
		}
	}
	return 0;
}
