#include<iostream>
using namespace std;

int main()
{
    int A[10];
    for (int i = 0; i < 10; i++)
        cin >> A[i];
    int first = A[0], second = A[1], third = A[2];
    if (second < third)swap(second, third);
    if (first < second)swap(first, second);
    if (second < third)swap(second, third);
    for (int j = 0; j < 7; j++) {
        if (third < A[j + 3])third = A[j + 3];
        else if (second < A[j + 3]) {
            third = second;
            second = A[j + 3];
        }
        else if (first < A[j + 3]) {
            third = second;
            second = first;
            first = A[j + 3];
        }
    }
    cout << first << endl << second << endl << third << endl;
    return 0;
}