#include <iostream>
#include <set>

using namespace std;

int main(void)
{
	multiset<int> s;
	int i1;
	int h;

	for(i1=0;i1<10;i1++){
		cin>>h;
		s.insert(h);
	}

	multiset<int>::reverse_iterator rit=s.rbegin();
	for(i1=0;i1<3;i1++){
		cout<<(*rit)<<endl;
		rit++;
	}

	return 0;
}