#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

int main(void)
{
	vector <int> a;
	int b;
	
	for (int i = 0; i < 10; i++){
		scanf("%d", &b);
		a.push_back(b);
	}
	sort(a.begin(), a.end());
	printf("%d\n%d\n%d\n", a[9], a[8], a[7]);
	
	return 0;
}