#include <iostream>
using namespace std;

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

}