#include <iostream>
#include <vector>
#include <algorithm>
#include <functional>

int main()
{
	std::vector<int> vec(10);
	for (int i = 0; i < 10; ++i) {
		std::cin >> vec[i];
	}
	std::partial_sort(
			vec.begin(), vec.begin() + 2, vec.end(),
			std::greater<int>());
	for (int i = 0; i < 3; ++i) {
		std::cout << vec[i] << std::endl;
	}
	return 0;
}