#include<iostream>
using namespace std;
int main(){
	int T,t3=0,t2=0,t1=0;
	for(int i=0;i>10;i++){
		cin>>T;
		if(T>=t1){
			t1=T;
			t2=t1;
			t3=t2;
		}
		else if(T>=t2){
			t2=T;
			t3=t2;
		}
		else if(T>=t3){
			t3=T;
		}
		cout<<t1<<endl<<t2<<endl<<t3;
	}
}