#include <iostream>
using namespace std;
int main(){
  int h1=0,h2=0,h3=0,h;
  for(int i;i<10;++i){
    cin >> h;
    if(h>h1){
      h3=h2;
      h2=h1;
      h1=h;
    }else if(h>h2){
      h3=h2;
      h2=h;
    }else if(h>h3){
      h3=h;
    }
  }
  cout<<h1<<endl<<h2<<endl<<h3<<endl;
}