#include<iostream>
using namespace std;

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