#include<iostream>
using namespace std;

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

	for(i = 0 ; i < 10 ; i++){
		cin >> num[i];
		tmp = num[i];
		for(j = 0 ; j < 3 ; j++ ){
			if(tall[j] <= tmp){
				x = tall[j];
				tall[j] = tmp;
				tmp = x;

			}
		}
	}
	for( i = 0; i < 3 ; i++)
		cout << tall[i] << endl;
    return 0;
}