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

int main() {
	std::vector<int> v;
	std::copy( std::istream_iterator<int>(std::cin), std::istream_iterator<int>(), std::back_inserter(v) );
	std::sort( v.begin(), v.end(), std::greater<int>() );
	std::copy( v.begin(), v.begin()+3, std::ostream_iterator<int>(std::cout, "\n" ));
}