#include<iostream>
using namespace std;

int first = 0, second = 0, third = 0;

//???????????¨
void sort(){
	int buf = third;
	if(third > first){
	//3rd > 1st??????,1->2 2->3 3->1?????????
		third = second;
		second = first;
		first = buf;
	}else if(third > second){
	//3rd > 2nd??????,2->3 3->2?????????
		third = second;
		second = buf;
	}
}

int main(){
int buf;

for(int i = 0; i < 10; i++){
	cin >> buf;
	//3rd????????§?????????????????????
	if(buf > third){
		third = buf;
		sort();
	}
}

//??¨???
cout << first << "\n";
cout << second << "\n";
cout << third << "\n";

return 0;
}