#include <iostream>
using namespace std;

int main() {
	int first, second, third, input[10];
	first=0;
	second=0;
	third=0;
	cin >> input[0]
	cin >> input[1]
	cin >> input[2]
	cin >> input[3]
	cin >> input[4]
	cin >> input[5]
	cin >> input[6]
	cin >> input[7]
	cin >> input[8]
	cin >> input[9]
	int i;
	for(i=0;i<=10;i++){
		if(input[i] > third){
			if(input[i] > second){
				if(input[i] > first){
					first=input[i];
				}else{
					second=input[i];
				}
			}else{
				third=input[i];
			}
		}
	}
	cout << first << endl;
	cout << second << endl;
	cout << third << endl;
	return 0;
}