#include<iostream>
using namespace std;

int main() {
	int h[10],max;
	for (int i = 0; i < 10; i++) {
		cin >> h[i];
	}
	
	for (int j = 0; j < 3; j++) {
		max = 0;
		for (int i = 1; i < 10; i++) {
			if (h[max] < h[i])
				max = i;
		}
		cout << h[max] << "\n";
		h[max] = -1;
	}
	return 0;
}
