#include <iostream>
using namespace std;

int main(){
	int a=0,b=0,c=0,x;

	for(int i=0;i<=9;i++){
		cin >> x;

		if(x>=a){
			c=b;
			b=a;
			a=x;
		}else if(x>=b){
			c=b;
			b=x;
		}else if(x>=c){
			c=x;
		}
	}

	cout << a << endl;
	cout << b << endl;
	cout << c << endl;

	return 0;
}