#include <iostream>
using namespace std;

void Sort(int array[],int n)
{
    int i,j,temp;
    
    for (i = 0;i < n - 1;i++) {
        for (j = 0;j < n - 1;j++) {
            if (array[j + 1] < array[j]) {
                temp = array[j];array[j] = array[j + 1];array[j + 1] = temp;
            }
        }
    }
}

int main()
{
  int heights[10];
  for(int i=0;i<10;i++){
    cin >> heights[i];
  }

  Sort(heights, 10);

  cout << heights[9] << endl << heights[8] << endl << heights[7] << endl;
  return 0;
}