#include <iostream>
#include <cstdio>
#include <iomanip>
#include <algorithm>
#include <cmath>
using namespace std;
const int M = 100000;
const double pi = 3.141592653589;

int main()
{
	int  high[3] = { 0 };
	for (int i = 0; i < 10; i++) {
		int n;
		cin >> n;
		if (n > high[0]) {
			high[2] = high[1];
			high[1] = high[0];
			high[0] = n;
		}
		else {
			if (n > high[1]) {
				high[2] = high[1];
				high[1] = n;
			}
			else {
				if (n > high[2]) high[2] = n;
			}
		}
	}
	printf("%d\n%d\n%d\n", high[0], high[1], high[2]);
}