#include <cstdio>
#include <functional>
#include <algorithm>

using namespace std;

int main(void)
{
  int i;
  int heights[10];

  for (i = 0; i < 10; i++) {
    scanf("%d", &heights[i]);
  }

  sort(heights, heights + 10, greater<int>());

  for (i = 0; i < 3; i++) {
    printf("%d\n", heights[i]);
  }

  return 0;
}