#include <stdio.h>
main(){
  int h[10];
  int st,nd,rd,i;
  st = 0;
  nd = 0;
  rd = 0;
  for(i=0;i<10;i++){
    scanf("%d",&h[i]);
    if(h[i]>=st){
      st = h[i];
    }else if(h[i]>=nd){
      nd = h[i];
    }else if(h[i]>=rd){
      rd = h[i];
    }
  }
  printf("%d\n%d\n%d\n",st,nd,rd);
} 