#include<iostream>
#include<cstdio>
using namespace std;

int main(){

	int hill[]={0,0,0,0,0,0,0,0,0,0};

	for(int j=0;j<=9;j++){
		scanf("%d",&hill[j]);
	}

	int key;

	//sort
	for(key=9;key>=0;key--){

		for(int i=0;i<=key;i++){
			if(hill[i]>hill[i+1]){
				swap(hill[i],hill[i+1]);
			}
		}

	}

	printf("%d\n%d\n%d\n",hill[9],hill[8],hill[7]);

	return 0;

}