#include <iostream>
#include <string>
using namespace std;
 
int main(){
int rank[3],a[10],i = 0,ii = 0;
rank[0] = 0;
rank[1] = 0;
rank[2] = 0;
while(i <= 9){
	cin >> a[i];
	while(ii <= 2){
		if(rank[ii] == 0){
			rank[ii] = a[i];
		}else{
			if(rank[ii] < a[i]){
				rank[ii] = a[i];
				break;
			}
		}
		ii++;
	}
i++;
ii = 0;

}
cout<<rank[0]<<endl<<rank[1]<<endl<<rank[2]<<endl;




}