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

int main() {
  int top=0;
  int second=0;
  int third=0;
  int height;
  std::vector<int> heights;

  while(scanf("%d\n", &height) != EOF) {
    heights.push_back(height);
  }

  std::sort(heights.begin(), heights.end());

  for(int i=0;i<3;i++) {
    std::cout << heights.back() << std::endl;
    heights.pop_back();
  }
}