#include <iostream>
#include <vector>
#include <algorithm>
int main(){
	int h;
	std::vector<int> heights;
	for(int i=0; i<10; i++){
		std::cin >> h;
		heights.push_back(h);
	}
	std::sort(heights.begin(), heights.end(), std::greater<int>());
	int i=0;
	for(std::vector<int>::iterator it=heights.begin();
		i<3 && it!=heights.end(); i++, it++){
			std::cout << *it << '\n';
	}
}