#include <stdio.h>
#include <algorithm>
#include <vector>
#include <functional> 

#define FOR(i,a,b) for(int i=(int)a;i<(int)b;++i)
#define REP(i,n) FOR(i,0,n)
 
int main()
{
  int n;
  std::vector<int> d;
  REP(i,10) {
      scanf("%d", &n);;
      d.push_back(n);
  }
  std::sort(d.begin(), d.end(), std::greater<int>() );
  printf("%d\n",d[0]);
  printf("%d\n",d[1]);
  printf("%d\n",d[2]);
   
  return 0;
}
