#include <stdio.h>

int sort(int a, int b[], int n)
{
	 if(b[n] > a) return n;
	 else {n++; sort(a, &b[n], n);}
}

int main()
{
	int x[10];
	int y[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
	
	for (int i = 0; i < 10; i++){
		scanf("%d", &x[i]);

		y[sort(x[i], y, 0)] = x[i];
	}

	printf("%d\n%d\n%d\n", y[0], y[1], y[2]);

	return 0;
}