#include<stdio.h>
#define SIZE 10

/**
 * 関数宣言
 */
void binarySort(int* datas, int size);

int main(){
	int heights[SIZE];
	int i;
	
	for(i = 0; i < SIZE; i++)
	{
		scanf(" %d", heights+i);
	}
	
	binarySort(heights, SIZE);
	binarySort(heights+1, SIZE-1);
	binarySort(heights+2, SIZE-2);
		
	for(i = 0; i < 3; i++)
	{
		printf("%d\n", heights[i]);
	}
	
	
    return 0;
}

void binarySort(int* datas, int size)
{
	int i;
	int tmp;
	
	for(i = size-1; i >= 0; i--)
	{
		if(datas[i] < datas[i+1])
		{
			tmp = datas[i];
			datas[i] = datas[i+1];
			datas[i+1] = tmp;
		}
	}
	
	return;
}