#include <iostream>
#include <vector>

#define RANKING 3
int main(){
	int x;
	int ranking[RANKING] = {0};
	for(int i = 0; i < 10; i++){
		std::cin >> x;
		for(int i = 0; i < RANKING; i++){
			if(ranking[i] < x){
				for(int j = RANKING-1; j > i; j--){
					ranking[j] = ranking[j-1];
				}
				ranking[i] = x;
				break;
			}
		}
	}
	for(int i = 0; i < RANKING; i++){
		std::cout << ranking[i] << std::endl;
	}
	return 0;
}