#include<iostream>
using namespace std;

int main(){
	int val[3]={0};
	for(int i=0;i<10;i++){
		int a;
		cin >> a;
		if(a > val[0]){
			val[2] = val[1];
			val[1] = val[0];
			val[0] = a;
		}else if(a > val[1]){
			val[2] = val[1];
			val[1] = a;
		}
		else if(a > val[0])
			val[2] = a;
	}	
	for(int i=0;i<3;i++)
	cout << val[i] << endl;
}