#include <iostream>
#include <cstdio>
#include <cstdlib>
using namespace std;

int main(){
	int hills[10];
	char string[256];
	fgets(string, 256, stdin);
	for (int i = 0; i < 10; i++){
		char* one;
		one = strtok(string, "\n");
		hills[i] = atoi(one);
	}
	int top[4] = {0};
	for (int i = 0; i < 10; i++){
		if (hills[i] > top[0]){
			top[3] = top[2];
			top[2] = top[1];
			top[1] = top[0];
			top[0] = hills[i];
		}else if (hills[i] > top[1]){
			top[3] = top[2];
			top[2] = top[1];
			top[1] = hills[i];
		}else if (hills[i] > top[2]){
			top[2] = top[1];
			top[1] = hills[i];
		}
	}
	fprintf(stdout, "%d\n%d\n%d",top[0],top[1],top[2]);
	return 0;
}