#include<stdio.h>
int main(void){
  int high[10]={},i;
  int max=0;
  int sec=0;
  int thi=0;
 
  for(i=0;i<10;i++){
    scanf("%d",&high[i]);
  }
 
  for(i=0;i<10;i++)
    if(max<high[i])
      max=high[i];
   
  for(i=0;i<10;i++)
    if(high[i]<max && sec<high[i])
      sec=high[i];
 
  for(i=0;i<10;i++)
    if(high[i]<sec && thi<high[i])
      thi=high[i];
 
  printf("%d\n%d\n%d\n",max,sec,thi);
 
  return 0;
}