#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <algorithm>
#include <functional>
#include <cstring>
#include <queue>
#include <math.h>
#include <iterator>
using namespace std;

int main() {
	short mountain[10] = {0};
	for (short i = 0;i < 10;++i) {
		scanf("%d", &mountain[i]);
	}
	sort(mountain, mountain + 10,greater<short>());
	for (short i = 0;i < 3;++i) {
		printf("%d\n", mountain[i]);
	}
}
