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

using namespace std;

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

	for (int i = 1; i < 10; i++) {
		int v = H[i];
		int j = i - 1;
		while (j >= 0 && H[j] < v) {
			H[j + 1] = H[j];
			j--;
		}
		H[j + 1] = v;
	}

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

	return 0;
}