#include <stdio.h>

int main()
{
  int first = 0;
  int second = 0;
  int third = 0;
  int high, i;

  for(i = 0;i < 10;i++){
    scanf("%d", &high);
    
    if(high > first){
      third = second;
      second = first;
      first = high;
    }else if(high > second){
      third = second;
      second = high;
    }else if(high > third){
      third = high;
    }
  }
  printf("%d\n", first);
  printf("%d\n", second);
  printf("%d\n", third);
 
}