#include<iostream>
int main() {
	int m[10];
	for (int i = 0; i < 10; ++i) {
		std::cin >> m[i];
	}
	for (int i = 0; i < 10; ++i) {
		for (int j = 0; j < 10; ++j) {
			int a;
			if (m[i] < m[j]) {
				a = m[i];
				m[i] = m[j];
				m[j] = a;
			}
		}
	}
		std::cout << m[9] << std::endl;
		std::cout << m[8] << std::endl;
		std::cout << m[7] << std::endl;
		return 0;
	}