#include<bits/stdc++.h>
using namespace std;

void printA(int A[], int N){
	printf("%d",A[0]);
	for(int i=1; i<N; ++i){
		printf(" %d",A[i]);
	}
	printf("\n");
}

main(){
	int A[10];
	
	for(int i=0;i <10; ++i){
		cin >> A[i];
	}
	
	sort(A, A + 10);
	
	cout << A[9] << endl;
	cout << A[8] << endl;
	cout << A[7] << endl;
}
