#include <stdio.h>

int main(){
  int input, output[3]={}, i;
  
  for( i=0; i<10; i++){
    scanf("%d", &input);
    if( input > output[0]){
      output[2] = output[1];
      output[1] = output[0];
      output[0] = input;
    }else if( input > output[1]){
      output[2] = output[1];
      output[1] = input;
    }else if( input > output[2]){
      output[2] = input;
    }
  }

  for( i=0; i<3; i++){
    printf("%d\n", output[i]);
  }
  
  return 0;
  }
  