#include<iostream>
using namespace std;

int main(void) {
	int a[10] = { 0 };
	for (int i = 0; i < 10; i++) {
		cin >> a[i];
	}
	for (int j = 0; j < 3; j++) {
		int max = 0, label = 0;
		for (int i = 0; i < 10; i++) {
			if (a[i] > max) {
				max = a[i];
				label = i;
			}
		}
		cout << max << endl;
		a[label] = 0;
	}
	return 0;
}