#include "stdio.h"


int main(){
	int i,max1 = 0,max2 = 0,max3 = 0;
	int Hill[10];
	for(i = 0;i < 10;i++){
		scanf("%d",&Hill[i]);
	}
	for(i = 0;i < 10;i++){
		if(max1 < Hill[i]){
			max3 = max2;
			max2 = max1;
			max1 = Hill[i];
		}
		else if(max2 < Hill[i]){
			max3 = max2;
			max2 = Hill[i];
		}
		else if(max3 < Hill[i])max3 = Hill[i];
	}
	printf("%d\n%d\n%d\n",max1,max2,max3);
}