#include <iostream>
#include <algorithm>
#include <cstdio>

using namespace std;

int main()
{
	int mon[10];
	for(int i = 0;i <10; i++){
		cin >> mon[i];
	}
	
	int first = 0;
	for(int i = 0; i < 10; i++){
		if(first < mon[i]) first = mon[i];
	}
	
	int second = 0;
	for(int i = 0; i < 10; i++){
		if(second < mon[i] && mon[i] != first) second = mon[i];
	}
	
	int third = 0;
	for(int i = 0; i < 10; i++){
		if(third < mon[i] && mon[i] != first && mon[i] != second) third = mon[i];
	}
	
	printf("%d\n%d\n%d\n", first, second, third);
	
	return 0;
}