#include <cstdio>

int main(){

  int h[10],i,a=0,b=0,c=0;

  for(i=1;i<=10;i++){

    scanf("%d",&h[i]);

    if (a < h[i]){
      c=b; b=a; a=h[i];
    }else if (b < h[i]){
      c=b; b=h[i];
    }else if (c < h[i]){
      c=h[i];
    }
  }
  printf("%d\n%d\n%d\n", a, b, c);
  return 0;
}