#include<bits/stdc++.h>
using namespace std;
int main(){
  int f=0,s=0,sr=0,b;
  for(int i=0;i<10;i++){
    cin>>b;
    if(f<b){
      sr=s;
      s=f;
      f=b;
    }else if(s<b){
      sr=s;
      s=b;
    }else if(sr<b){
      sr=b;
    }
  }
  cout<<f<<endl<<s<<endl<<sr<<endl;
  return(0);
}

