#include <iostream>

int main ()
{
	int h[10]{};

	for (int i = 0; i < 10 ; i++) {
		std::cin >> h[i];
	}
	for (int i = 0; i < 9; i++) {
		int pv = h[i];
		int k = i;
		for (int j=i+1 ; j<10 ; j++){
			if (h[j] < pv) {
				pv = h[j];
				k = j;
			}
		}
		int sw = h[i];
		h[i] = h[k];
		h[k] = sw;
	}
	std::cout << h[9] << std::endl;
	std::cout << h[8] << std::endl;
	std::cout << h[7] << std::endl;
}