#include <iostream>

int main(){
	int first=0,second=0,third=0,height;
	for(int i=0;i<10;++i){
		cin>>height;
		if(height>first){
			second=first;
			first=height;
		}
		else if(height>second){
			third=second;
			second=height;
		}
		else if(height>third){
			third=height;
		}
	}
	std::cout<<first<<'\n'<<second<<'\n'<<third<<'\n';
	return 0;
}