#include <cstdio>
#include <cstdlib>


long long a[10];

int cmp (const void *p1, const void *p2) {
  if (* (long long *)p1 > * (long long *)p2) return 1;
  if (* (long long *)p1 == * (long long *) p2) return 0;
  return -1;
}

int main () {
  int i;
  for (i = 0; i < 10; i++) {
    scanf("%lld", a + i);
  }
  qsort(a, 10, sizeof(long long),  cmp);
  for (i = 0; i < 3; i++) {
    printf("%lld\n", a[9-i]);
  }
  return 0;
}