#include <iostream>
using namespace std;

int main() {
	int a = 0, b = 0, c = 0, h;
	for(int i = 0; i < 9; ++i){
		cin >> h;
		if(a < h){
			c = b;
			b = a;
			a = h;
		}
		else if(b < h){
		    c = b;
		    b = h;
		}
		else if(c < h){
			c = h;
		}
	}
	cout << a << endl << b << endl << c << endl;
	return 0;
}