#include<iostream>

using namespace std;
int main() {
	int i, a, b, c;
	a = 0;
	b = 0;
	c = 0;
	while (cin >> i) {
		if (a < i) {
			c = b;
			b = a;
			a = i;
		}
		else if (b < i) {
			c = b;
			b = i;
		}
		else if (c < i) {
			c = i;
		}
	}
	cout << a << endl << b << endl << c << endl;
	return 0;
}