#include<iostream>
using namespace std;
int main() {
	int x, a, b, c;
	a = 0;
	b = 0;
	c = 0;
	for (int i = 0; i <= 9; i++) {
		cin >> x;
		if (a <= x) {
			c = b;
			b = a;
			a = x;
			goto a;
		}
		if (b <= x) {
			c = b;
			b = x;
			goto a;
		}
		if (c <= x) {
			c = x;
			goto a;
		}
	a:;
	}
	cout << a << endl;
	cout << b << endl;
	cout << c << endl;
}

