#include<stdio.h>
using namespace std;

int main() {
	int m[10], t[3]={0,0,0};
	for (int n = 0; n < 10; n++) {
		scanf("%d",&m[n]);
	}
	for (int n = 0; n < 10; n++) {
		if (t[0] < m[n]) {
			t[2] = t[1];
			t[1] = t[0];
			t[0] = m[n];
		}else if(t[1] < m[n]) {
			t[2] = t[1];
			t[1] = m[n];
		}
		else if(t[2] <m[n]) {
			t[2] = m[n];
		}
	}
	for (int n = 0; n < 3; n++) {
		printf("%d\n",t[n]);
	}
	return 0;
}
