#include<iostream>
#include<list>
using namespace std;

int main(){
	list<int> yama;
	int tmp=0;
	while(yama.size()<10){
		cin>>tmp;
		yama.push_back(tmp);
	}
	yama.sort(greater<int>());
	list<int>::iterator it=yama.begin();
	for(int i=0;i<3;i++){
		cout<<*it<<endl;
		it++;
	}
	
	return 0;
}