#include <stdio.h>
#include <math.h>
#include <iostream>

using namespace std;

int main() {

	int counter[9];
	int a[100];
	int MAX = 0;
	int i = 0;
	
	while (cin >> a[i]) {
		counter[a[i] + 1]++;
		i++;
	}

	for (int j = 0; j < 9; j++) {
		MAX = max(MAX, a[j]);
	}

	for (int k = 0; k < 9; k++) {
		if (MAX == a[k]) {
			cout << a[k] << endl;
		}
	}

	return 0;
}