#include <iostream>
#include <array>

using namespace std;

int main()
{
    int n = 10;
    int i = 0, j = 0;
    array<int, 10> arr;
    
    for (int i = 0; i < 10; i++)
    {
        cin >> arr[i];
    }
    
    for (i = 0; i < n - 1; i++)
    {
        for (j = i + 1; j < n; j++)
        {
            if (arr[i] < arr[j])
            {
                swap(arr[i], arr[j]);
            }
        }
    }
    
    for (i = 0; i < 3; i++)
    {
        cout << arr[i] << endl;
    }
    
    return 0;
}

