#include <iostream>
#include <algorithm>

using namespace std;

int main() {
	int mountain[10];
	int m_max[3];
	int MAX;
	int count = 0;
	int n;

	for(int i = 0; i < 10; i++) {
		cin >> mountain[i];
	}

	MAX = mountain[0];

	while(count != 3){

		for(int i = 0; i < 10; i++) {
			if(MAX < mountain[i]) {
				MAX = mountain[i];
				n = i;
			}
		}

		m_max[count] = MAX;
		count++;
		mountain[n] = 0;
		MAX = 0;

	}

	for(int i = 0; i < 3; i++) {
		cout << m_max[i] << endl;
	}

}