#include<iostream>
using namespace std;

int main(void){
	int a=0, b=0, c=0;
	for(int i=0; i<10; i++){
		int tmp;
		cin >> tmp;
		if(tmp>c){
			if(tmp>b){
				if(tmp>a){
					c=b;b=a;a=tmp;
				}
				else{
					c=b;b=tmp;
				}
			}
			else{
				c=tmp;
			}
		}
	}
	cout << a << endl << b << endl << c << endl;
	return 0;
}