#include <iostream>
#include <algorithm>
using namespace std;
void q_sort(int array[], int begin, int end);

void q_sort(int array[], int begin, int end){
    int i = begin;
    int k = end;
    int pivot;
    int temp;
    pivot = array[(begin + end) / 2];
    while (1) {
        while (array[i] < pivot) {
            ++i;
        }
        while (pivot < array[k]) {
            k--;
        }
        if (i >= k) {
            break;
        }
        temp = array[i];
        array[i] = array[k];
        array[k] = temp;
        i++;
        k--; //check
    }
    if (begin < i - 1) {
        q_sort(array, begin, i - 1);
    }
    if (k + 1 < end) {
        q_sort(array, k + 1, end);
    }
}
int main(int argc, const char * argv[])
{
    int mt[10];
    for (int i = 0; i < 10; i++) {
        cin >> mt[i];
    }
    q_sort(mt, 0, 9);
    for (int i = 9; 6 < i; i--) {
        cout << mt[i] << endl;
    }
    return 0;
}