#include <iostream>
using namespace std;

void swap(int* x, int* y){
	int tmp = *x;
	*x = *y;
	*y = tmp;
}

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