#include <iostream>
using namespace std;

int Hills[10];

void Sort(int array[],int n)
{
	int i,j,temp;
	
	for (i = 0;i < n - 1;i++) {
		for (j = 0;j < n - 1;j++) {
			if (array[j + 1] < array[j]) {
				temp = array[j];array[j] = array[j + 1];array[j + 1] = temp;
			}
		}
	}
}


int main(){

	cin >> Hills[0] >> Hills[1] >> Hills[2] >> Hills[3] >> Hills[4] >> Hills[5]
	>> Hills[6] >> Hills[7] >> Hills[8] >> Hills[9];

	Sort(Hills,10);

	cout << Hills[9] << endl << Hills[8] << endl << Hills[7] << endl;


	return 0;
}