#include<iostream>

using namespace std;

int main()
{
	int high[10];
	for(int ix = 0;ix != 10;++ix)
		cin >> high[ix];

	int index = 0;
	for(int jx = 0;jx != 3;++jx){
		for(int ix = 0;ix != 10;++ix)
			if(high[index] <= high[ix])
				index = ix;
		cout <<high[index]<<endl;
		high[index] = 0;
	}

	return 0;
}