#include <iostream>
#include <list>
#include <algorithm>

int main() {
	std::list<int> mountain;
	int height;

	for(int i=1; i<=10; ++i){
		std::cin >> height;
		mountain.push_back(height);
	}

	for(int i=1; i<=3; ++i){
		std::list<int>::iterator max_it = std::max_element(mountain.begin(), mountain.end());
		std::cout << *max_it << std::endl;
		mountain.erase(max_it);
	}

	return 0;
}