#include <iostream>
#include <cstdlib>
#include <ctime>

#define N 10

using namespace std;


bool check(int mountain[N]){
	for (int i=0; i<(N-1); ++i){
		if (mountain[i] < mountain[i+1]){
			return false;
		}
	}
	return true;
}

void swap(int& a, int& b){
	int tmp = a;
	a = b;
	b = tmp;
}

void bubble_sort(int mountain[N]){
	for (int i=0; i<N; ++i){
		for (int j=0; j<(N-i); ++j){
			if (mountain[j] < mountain[j+1]){
				swap(mountain[j], mountain[j+1]);
			}
		}
	}
}

int main(void){
	srand(time(NULL));
	int counter = 0;
	/*while (counter == 0){*/
		int mountain[N];
		for (int i=0; i<N; ++i){
			int tmp;
			do{
				cin >> tmp;
				/*tmp = rand() % 10001;*/
				/*cout << tmp << endl;*/
			}while ((tmp<0) || (10000 < tmp));
			mountain[i] = tmp;
		}
		bubble_sort(mountain);

		//cout << "output" << endl;
		for (int i=0; i<3; ++i){
			cout << mountain[i] << endl;
		}
		/*if (check(mountain) == false){
			cout << "Error!" << endl;
		}
		else{
			cout << "OK" << endl;
		}
		cout << "counterの入力:";
		cin >> counter;*/
	/*}*/


	return 0;
}