#include <iostream>
using namespace std;

int main(){
	int date[10], work;
	for(int i = 0; i < 10; i++){
		cin >> date[i];
	}

	for(int i = 9; i > 6; i--){
		for(int j = i; j >= 0; j--){
			if(date[i] < date[j]){
				work = date[i];
				date[i] = date[j];
				date[j] = work;
			}
		}
		cout << date[i] << endl;
	}
	return 0;
}