#include<iostream>
using namespace std;

int main(){
	int yama;
	int a = 0;
	int b = 0;
	int c = 0;

	for (int i = 0; i < 10; i++){
		cin >> yama;
		if (a < yama){
			c = b;
			b = a;
			a = yama;
		}
		else if (b < yama || a == yama){
			c = b;
			b = yama;
		}
		else if (c < yama || b == yama){
			c = yama;
		}
	}
	cout << a << endl << b << endl << c << endl;

	return 0;
}
