#include <iostream>
#include <vector>
#include <algorithm>

class top3hills {
public:
    top3hills();
    // top3hills(const top3hills& old);
    // ~top3hills();
    bool Run();

private:
    bool input();
    bool calc();
    void show() const;
public:
    static const int ReadMax;
    static const int ShowMax;

private:
    std::vector<int> m_mountData;   // List of mount
    std::vector<int> m_top3hills;   // List of top3 hills
};

const int top3hills::ReadMax = 10;
const int top3hills::ShowMax = 3;

top3hills::top3hills()
{

}

bool top3hills::Run()
{
    bool status = false;

    status = input();
    if (!status) {
        std::cerr << "input falure." << std::endl;
    }
    status = calc();
    if (!status) {
        std::cerr << "calc failure." << std::endl;
    }
    show();

    return true;
}

bool top3hills::input()
{
    int mountData = 0;

    for (int i = 0; i < ReadMax; ++i) {
        if (ReadMax <= i || ReadMax < m_mountData.size()) {
            return false;
        }
        std::cin >> mountData;
        m_mountData.push_back(mountData);
    }

    return true;
}

bool top3hills::calc()
{
    // Sort mount data
    std::sort(m_mountData.begin(), m_mountData.end());

    // Reverse mount data
    std::reverse(m_mountData.begin(), m_mountData.end());

    for (int i = 0; i < ShowMax; ++i) {
        if (ShowMax <= i || ShowMax < m_top3hills.size()) {
            return false;
        }
        m_top3hills.push_back(m_mountData.at(i));
    }

    return true;
}

void top3hills::show() const
{
    for (int i = 0; i < ShowMax; ++i) {
        std::cout << m_top3hills.at(i) << std::endl;
    }
}

int main()
{
    top3hills top3;
    top3.Run();
}