#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

bool compareHeight(int v1, int v2) {
	return v2 < v1;
}

int main() {
	vector<int> HeightVec;
	int iHeight = 0;
	for (int i = 0; i < 10; i++) {
		cin >> iHeight;
		HeightVec.push_back(iHeight);
	}
	
	sort(HeightVec.begin(),HeightVec.end(),compareHeight);
	cout << HeightVec[0] << endl;
	cout << HeightVec[1] << endl;
	cout << HeightVec[2] << endl;

	return 0;
}