#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

int main()
{
    vector<int> height;
    int buff;
    for(int i=0; i< 10; i++)
    {
        std::cin >> buff;
        height.push_back(buff);
    }
    sort(height.begin(), height.end());
    cout << height[height.size() - 1] << endl;
    cout << height[height.size() - 2] << endl;
    cout << height[height.size() - 3] << endl;
    
    return 0;
}