#include <iostream>
#include <iterator>
#include <algorithm>
#include <vector>

int main()
{
	std::vector<int> input;
	std::copy(
		std::istream_iterator<int>(std::cin),
		std::istream_iterator<int>(),
		std::back_inserter(input));

	std::partial_sort(input.begin(), input.begin() + 3, input.end(), std::greater<int>());

	for (std::vector<int>::const_iterator i = input.begin(); i != input.begin() + 3; ++i) {
		std::cout << *i << "\n";
	}
	return 0;
}