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

using namespace std;

struct cell{
	int no;
	int n;
};

bool compare(const cell& left, const cell& right)
{
  return left.n > right.n ;
}

#define MAX 100

int main()
{
	vector<cell> data(MAX);
	int a;
	int i;

	for (i = 0; i < MAX; i++) {
		data[i].no = i+1;
		data[i].n = 0;
	}

	while (cin>>a) {
		data[a-1].n ++;
	}

	sort(data.begin(), data.end(), compare);

	cout<<data[0].no<<endl;
	for (i = 1; i < MAX; i++) {
		if (data[i-1].n != data[i].n) break;
		cout<<data[i].no<<endl;
	}

	return 0;
}