#include <iostream>


void bubbleSort(int *array, int size) {
  size -= 1;
  int temp = 0;

  for (int i = 0; i < size; i ++)
    for (int j = 0; j < size; j ++)
      if (array[j] < array[j + 1]) {
        temp = array[j];
        array[j] = array[j + 1];
        array[j + 1] = temp;
      }
}

int main() {
  int heights[10];
  int size = 0;
  for (int i = 0; i < 10; i ++)
    std::cin >> heights[i];
  size = sizeof(heights) / sizeof(*heights);

  bubbleSort(heights, size);

  for (int i = 0; i < 3; i ++)
    std::cout << heights[i] << std::endl;

  return 0;
}