#include<cstdio>
#define LOOP(i,f,t) for(int i=f;i<t;++i)
inline void swap(short&a,short&b){
  int t=a;a=b;b=t;
}
int main(){
  short h[10];
  LOOP(i,0,10)scanf("%d",h+i);
  LOOP(i,0,3){
    LOOP(j,i+1,10){
      if(h[i]<h[j])swap(h[i],h[j]);
    }
  }
  LOOP(i,0,3)printf("%d\n",h[i]);
}