#include <iostream>
using namespace std;

int main(){
	int h[10];
	int x1=0, x2=0, x3=0;

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

	for(int i=0; i<10; ++i){
		if(h[i] >= x1){
			x3 = x2;
			x2 = x1;
			x1 = h[i];
		}else if(h[i] >= x2){
			x3 = x2;
			x2 = h[i];
		}else if(h[i] >= x3){
			x3 = h[i];
		}
	}

	cout << x1 << endl << x2 << endl << x3 << endl;

	return 0;
}