#include <stdio.h>
void quickSort(int numbers[], int l, int r);
int main()
{
	int numbers[10];
	for (int i = 0; i < 10; i++) {
		scanf("%d", &numbers[i]);
	}
	quickSort(numbers, 0, 9);
	for (int i = 7; i < 10; i++)
		printf("%d", numbers[i]);
	return 0;
}
void quickSort(int numbers[], int l, int r)
{
	if (l < r)
	{
		int i = l, j = r, x = numbers[l];
		while (i < j)
		{
			while (i < j && numbers[j] >= x)
				j--;
			if (i < j)
				numbers[i++] = numbers[j];

			while (i < j && numbers[i] < x)
				i++;
			if (i < j)
				numbers[j--] = numbers[i];
		}
		numbers[i] = x;
		quickSort(numbers, l, i - 1);
		quickSort(numbers, i + 1, r);
	}
}