#include<iostream>
using namespace std;
//????????????
void swap(int idx1, int idx2, int *node)
{
	int f = node[idx1];
	node[idx1] = node[idx2];
	node[idx2] = f;
}
//??????????????????????????????????????nlogn
void quickSort(int left, int right , int *node)
{
	int pl = left;
	int pr = right;
	int pivot_f = node[(pl + pr) / 2];
	do
	{
		while (node[pl] < pivot_f)
		{
			pl++;
		}
		while (node[pr]> pivot_f)
		{
			pr--;
		}
		if (pl <= pr)
		{
			swap(pl++, pr-- , node);
		}
	} while (pl <= pr);
	if (left < pr) quickSort(left, pr , node);
	if (pl <= right) quickSort(pl, right , node);
}

int main() {
	int num[10];
	for (int i = 0; i < 10; i++)
	{
		cin >> num[i];
	}
	quickSort(0, (10-1), num);
	for (int i = 1; i <= 3; i++)
	{
		cout << num[10-i] << endl;
	}
	return 0;
}