#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#include<iostream>
using namespace std;

void sort(int* rep) {
	bool flg = true;
	int temp;

	do{
		flg = false;
		if (rep[0] < rep[1]) {
			temp = rep[0];
			rep[0] = rep[1];
			rep[1] = temp;
			flg = true;
		}
		if (rep[1] < rep[2]) {
			temp = rep[1];
			rep[1] = rep[2];
			rep[2] = temp;
			flg = true;
		}
	} while (flg);
}




int main() {

	const int SIZE = 10;
	int a[3] = { 0,0,0 };

	cin >> a[0] >> a[1] >> a[2];
	sort(a);

	int value;
	for (int i = 3; i < SIZE; i++) {
		cin >> value;

		if (a[2] < value) {
			a[2] = value;
			sort(a);
		}
	}

	for (int i = 0; i < 3; i++) {
		printf("%d\n", a[i]);

	}


//	system("pause");
	return 0;
}
