#include <iostream>
#include <cstdio>
#include <algorithm>

int main() {
  int i;
  int height[10];
  for(i = 0; i < 10; i++) {
    scanf("%d", height+i);
  }
  std::sort(height, height+10);

  printf("%d\n%d\n%d\n", height[9], height[8], height[7]);

  return 0;
}