#include <iostream>
using namespace std;

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