#include <stdio.h>

int main(){
  int i, mt[10], max=0, max2=0, max3=0;
  for (i = 0; i < 10; i++){
    scanf("%d", &mt[i]);
    if(max <mt[i]) max = mt[i];
    else if (max2 <mt[i]) max2 = mt[i];
    else if (max3 <mt[i]) max3 = mt[i];
  }
  printf("%d\n%d\n%d\n",max, max2, max3);
  return 0;
}
