#include <iostream>
#include <array>
using namespace std;

int main()
{
    array<int, 10> mount;
    for (int i = 0; i < 10; i++){
        cin >> mount.at(i);
    }
    for (int j = 9; j != 6; j--){
        for (int i = 0; i < j; i++){
            if (mount.at(i) > mount.at(i+1)){
                int spare = mount.at(i);
                mount.at(i) = mount.at(i+1);
                mount.at(i+1) = spare;
            }
        }
    cout << mount.at(j) << endl;
    }
}