#include<iostream>
using namespace std;

int main(){
	int mountain[10]={}, first=0, second=0, third=0;

	for(int i=0; i<10; i++){
		cin >> mountain[i];
		if(first <= mountain[i]){
			first = mountain[i];	
		}
		else if(mountain[i]<=first && mountain[i]>=second){
			second = mountain[i];
		}
		else if(mountain[i]<=second && mountain[i]>=third){
			third = mountain[i];
		}
	}
	cout << first << "\n" << second << "\n" << third << endl;

	return 0;
}