#include <iostream>

int main(int argc, char ** argv) {
  int input, top[3] = {0};
  for (int i = 0; i < 10; i++) {
    std::cin >> input;
    if (input >= top[0]) {
      top[2] = top[1];
      top[1] = top[0];
      top[0] = input;
    }else if (input >= top[1]) {
      top[2] = top[1];
      top[1] = input;
    }else if (input >= top[2]) {
      top[2] = input;
    }
  }

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