#include<iostream>
using namespace std;

int main(){
	int i,tmp;
	int tall[3] = {0};
	int num[10];

	for(i = 0 ; i < 10 ; i++){
		cin >> num[i];
		if(tall[0] <= num[i]){
			tmp = tall[2];
			tall[2] = tall[1];
			tall[1] = tall[0];
			tall[0] = num[i];
		}
	}
	for( i = 0; i < 3 ; i++)
		cout << tall[i] << endl;
    return 0;
}