#include <stdio.h>
#include <stdlib.h>

int compare(const void *a, const void *b)
{
  return *(int*)b-*(int*)a;
}

int main(void)
{
  int heights[10];
  int i;
  for(i=0; i<10; ++i) {
    scanf("%d", &heights[i]);
  }
  qsort(heights, 10, sizeof(int), compare);
  printf("%d\n", heights[0]);
  printf("%d\n", heights[1]);
  printf("%d\n", heights[2]);

  return 0;
}