#include <iostream>
using namespace std;

int main() {
	int h[10];
	int max[3];
	int tmp, maxj;

	for (int i = 0; i < 10; ++i) {
		cin >> h[i];
	}

	for (int i = 0; i < 3; ++i) {
		tmp = 0;
		for (int j = 0; j < 10; ++j) {
			if (h[j] > tmp) {
				tmp = h[j];
				maxj = j;
			}
		}
		max[i] = tmp; h[maxj] = 0;
	}

	for (int i = 0; i < 3; ++i) {
		cout << max[i] << endl;
	}
	return 0;
}