#include<iostream>
using namespace std;
int main() {
	int mountain[10];
	int a, b, c;

	for (int i = 0; i < 10; i++) {
		cin >> mountain[i];
	}

	a = mountain[0];
	b = mountain[1];
	c = mountain[2];

	for (int y = 3; y <= 9; y++) {
		if (a <= b) {
			if (a <= c) {
				if (a < mountain[y]) {
					a = mountain[y];
				}
			}
			else {
				if (c < mountain[y]) {
					c = mountain[y];
				}
			}
		}
		else if (b <= c)
		{
			if (b < mountain[y]) {
				b = mountain[y];
			}
		}
	}
	if (a <= b) {
		if (a <= c) {
			if (b <= c) {
				cout << c << "\n" << b << "\n" << a << "\n";
			}
			else {
				cout << b << "\n" << c << "\n" << a << "\n";
			}
		}
		else cout << b << "\n" << a << "\n" << c << "\n";
	}
	else if (a <= c) {
		cout << c << "\n" << a << "\n" << b << "\n";
	}
	else if (b <= c) {
		cout << a << "\n" << c << "\n" << b << "\n";
	}
	else cout << a << "\n" << b << "\n" << c << "\n";

	char a____;
	cin >> a____;

	return 0;
}