#include <iostream>
using namespace std;
int top[3];
int main(){

	int h[10];
	for (int i = 0; i<=9;i++)
		cin >> h[i];
		
	for(int i = 0;i<=9;i++){
		if(top[0] <= h[i]){
			top[2] = top[1];
			top[1] = top[0];
			top[0] = h[i];
		
		}
		else if(top[1] <= h[i]){
			top[2] = top[1];
			top[1] = h[i];
		}
		else if(top[2]<= h[i]){
			top[2] = h[i];
		}
	
	}
	for(int j = 0;j<=2;j++)
		cout << top[j] << endl;
	
	return 0;
}