#include<iostream>
using namespace std;

void swap(int *a, int *b){
	int temp;
	temp = *a;
	*a = *b;
	*b = temp;
	
}

int main(){
	int arr[10];
	for(int i = 0; i < 10; i++){
		cin >> arr[i];
	}
	for(int i = 0; i < 10; i++)
		for(int j = 0; j < 10; j++)
			if(arr[i] < arr[j])
				swap(&arr[i], &arr[j]);
	cout << arr[9] << endl << arr[8] << endl << arr[7] << endl;
}
