#include <iostream>

int main() {
	
	int first, second, third;
	first = second = third = 0;
	
	for(int i=0; i<10; i++) {
		int t;
		std::cin >> t;
		
		if(first < t) {
			third = second;
			second = first;
			first = t;
		} else if(second < t) {
			third = second;
			second = t;
		} else if(third < t) {
			third = t;
		}
	}
	std::cout << first << std::endl;
	std::cout << second << std::endl;
	std::cout << third << std::endl;
	
	return 0;
}