#include <iostream>

int main() {

	int n = 10, i = 0, j = 0, v = 0, count = 0;
	int a[10];

	for (i = 0; i < n; i++) {
		std::cin >> a[i];
	}

	for (i = 1; i < n; i++) {
		v = a[i];
		j = i - 1;

		while ((j >= 0) && (a[j] > v)) {
			a[j + 1] = a[j];
			j--;
		}

		a[j + 1] = v;
	}

	std::cout << a[9] << std::endl;
	std::cout << a[8] << std::endl;
	std::cout << a[7] << std::endl;

	return 0;


}
