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

int main ()
{
	std::vector<int> h (10);
	int a;

	while (std::cin >> a) {
		h.push_back (a);
	}
	std::sort (begin (h), end (h));
	std::vector<int>::reverse_iterator it = rbegin (h);
	std::cout << *it++ << std::endl;
	std::cout << *it++ << std::endl;
	std::cout << *it++ << std::endl;
}