#include <iostream>
using namespace std;

int main() {
	const int N = 10;
	int data[N];
	int tmp;

	for (int i = 0;i<N;i++) cin >> data[i];
	for (int i = 1;i <= 3;i++) {
		for (int j = 0;j<N - i;j++) {
			if (data[j]>data[j + 1]) {
				tmp = data[j];
				data[j] = data[j + 1];
				data[j + 1] = tmp;
			}
		}
	}
	cout << data[N - 1] << endl << data[N - 2] << endl << data[N - 3] << endl;

	return 0;
}