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