#include<stdio.h>
#include<string.h>
#include<stdlib.h>

int main()
{
	int i=0;
	int a;
	int height[10]={0};
	int first,second,third;
	
	for(i=0;i<=9;i++)
	{
	 scanf("%d",&a);
	 height[i]=a;
	}
	
    first=0;second=0;third=0;
	
	for(i=0;i<10;i++)
	{
		if (height[i]>first)
		 {third=second;second=first;first=height[i];continue;}
		if (height[i]<=first&&height[i]>=second)
		 {third=second;height[i]=second;continue;}
		if (height[i]<second&&height[i]>third)
		 {third=height[i];continue;}
	}
	
	printf("%d \n%d \n%d \n",first,second,third);
	exit(0);
}