#include<iostream>
#include<string>
#include<algorithm>	
#include<cmath>
#include<map>
#include<vector>
#define int long long
using namespace std;
int test[123];
signed main() {
	int n, a, ans = 0;
	for (int h = 0; h < 12; h++) {
		cin >> n;
		test[n]++;
	}
	for (int h = 1; h <= 100; h++) {
		ans = max(ans, test[h]);
	}
	for (int h = 1; h <= 100; h++) {
		if (test[h] == ans) {
			cout << h << endl;
		}
	}
}
