#include <iostream>

using namespace std;

int main() {
	int a[10];
	for (int i = 0; i < 10; ++ i) 
		cin >> a[i];
	int t = 0;
	for (int i = 0; i < 10; ++ i) 
		if (a[t] < a[i]) t = i;;
	cout << a[t] << endl;
	a[t] = -1;
	t = 0;
	for (int i = 0; i < 10; ++ i) 
		if (a[t] < a[i]) t = i;;
	cout << a[t] << endl;
	a[t] = -1;
	t = 0;
	for (int i = 0; i < 10; ++ i) 
		if (a[t] < a[i]) t = i;;
	cout << a[t] << endl;
	a[t] = -1;
	t = 0;

	return 0;
}