#include<iostream>
using namespace std;

class Mountain {
public:
	int mountain[10];
	void get();
	void sort(int yama[10]);
	void show();
};

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

void Mountain::sort(int yama[10]) {
	int work;
	for (int i = 0; i < 9; i++) {
		for (int j = 0; j < 9; j++) {
			if (yama[j] < yama[j + 1]) {
				work = yama[j];
				yama[j] = yama[j + 1];
				yama[j + 1] = work;
			}
		}
	}
}

void Mountain::show() {
	for (int i = 0; i < 3; i++) {
		cout << mountain[i] << endl;
	}
}

int main() {
	Mountain mou;
	mou.get();
	mou.sort(mou.mountain);
	mou.show();
}
