#include <iostream>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <cstdlib>
#include <stack>
#include <queue>
#include <list>
#include <vector>
#include <sstream>

using namespace std;

int sort[100];

class qs{
	private:
	
	public:
	void QuickSort(int bottom,int top,int *data);
};

void qs::QuickSort(int bottom,int top,int *data){
	int lower, upper, div, temp;
	if (bottom >= top){
		return;
	}
	div = data[bottom];
	for (lower = bottom, upper = top; lower < upper;){
		while(lower <= upper && data[lower] <= div){
			lower++;
		}
		while(lower <= upper && data[upper] > div){
			upper--;
		}
		if(lower < upper){
			temp = data[lower];
			data[lower] = data[upper];
			data[upper] = temp;
		}
	}
	temp = data[bottom];
	data[bottom] = data[upper];
	data[upper] = temp;
	
	QuickSort(bottom, upper-1, data);
	QuickSort(upper+1,top,data);
}

int main(){
	int n;
	int i;
	
    n = 10;
	//cin >> n;
	for(i=0; i<n; ++i){
		cin >> sort[i];
	}
	
	qs qs01;
	qs01.QuickSort(0,n-1,sort);
	
	for ( i=n-1; i>n-4; --i){
		cout << sort[i] <<endl;
	}
	
	return 0;
}