#include<iostream>
#include<string>
#include<cmath>
#include<algorithm>
using namespace std; 
int main(){
  int a[10]={};  
  for(int i=1;i<=10;i++){
    cin>>a[i];
  }
 
  sort(a,a+10);
    cout<<a[9]<<endl;
  cout<<a[8]<<endl;
  cout<<a[7]<<endl;

  return 0;
}