#include<iostream>
using namespace std;

int main() {
	int h[10],max;
	for (int i = 0; i < 10; i++)
		cin >> h[i];
	
	for (int lp = 0; lp < 3; lp++) {
		max = -1;
		for (int lp2 = 0; lp2 < 10; lp2++) {
			if (max == -1)
				max = lp2;
			else if (h[max] < h[lp2])
				max = lp2;
		}
		cout << h[max]<<endl;
		h[max] = -1;
	}
	return 0;
}
