#include<iostream>

//関数の宣言
void sort(int mountain[10]);

int main(){
	
	const int a = 10;
	int mountain[a];
	
	for (int i = 0; i < 10; ++i){
		std::cin >> mountain[i];
	}
	sort(mountain);

	for (int i = 0; i < 3; i++){
		std::cout << mountain[i] << std::endl;
	}
	return 0;
}


//関数の定義
void sort(int mountain[10]){
	for (int i = 0; i < 9; ++i){
		for (int j =i+1; j < 10; ++j){
			if (mountain[i] < mountain[j]){
				int tmp = mountain[i];
				mountain[i] = mountain[j];
				mountain[j] = tmp;
			}
		}
	}
}
