#include<iostream>

using namespace std;

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