#include<iostream>
using namespace std;
int main(void)
{
  int a[10],n1=0,n2=0,n3=0;
  
  for(int i=0;i<10;i++){
    cin>>a[i];
      if(a[i]>=n1){
        n3=n2;
        n2=n1;
        n1=a[i];
      }
      else if(a[i]>=n2){
        n3=n2;
        n2=a[i];
      }
      else if(a[i]>=n3){
        n3=a[i];
      }
  }
  cout<<n1<<'\n'<<n2<<'\n'<<n3<<'\n';
}