#include<iostream>
using namespace std;
int main(){
  int a=-1,b=-1,c=-1,d;
  for(int i=0;i<10;i++){
    cin>>d;
    if(d>a){
      c=b;
      b=a;
      a=d;
    }else if(d>b){
      c=b;
      b=d;
    }else if(d>c){
      c=d;
    }
  }
  cout<<a<<endl<<b<<endl<<c<<endl;
  return(0);
}