#include<iostream>
#include<string>
#include<cmath>
#include<algorithm>
using namespace std;

int main(){
  int a[10];
  int f=0,s=0,t=0;
  cin>>a[0];
  f=a[0];
  for(int i=1;i<10;i++){
    cin>>a[i];
    if(a[i]>=f){
      s=f;
      f=a[i];}
      else if(a[i]>=s){
	t=s;
	s=a[i];}
	else if(a[i]>=t){
	  t=a[i];}
  }
  cout<<f<<endl;
  cout<<s<<endl;
  cout<<t<<endl;
      
    
    
    

  return 0;
}