#include <iostream>
using namespace std;

int main()
{
    int x[10];
    for (unsigned int i = 0; i < (sizeof(x) / sizeof(int)); i++)
        cin >> x[i];
    int first = 0;
    unsigned first_num;
    for (unsigned int i = 0; i < (sizeof(x) / sizeof(int)); i++)
        if (x[i] > first) {
            first = x[i];
            first_num = i;
        }
    int second = 0;
    unsigned second_num;
    for (unsigned int i = 0; i < (sizeof(x) / sizeof(int)); i++)
        if (x[i] > second && i != first_num) {
            second = x[i];
            second_num = i;
        }
    int third = 0;
    unsigned third_num;
    for (unsigned int i = 0; i < (sizeof(x) / sizeof(int)); i++)
        if (x[i] > third && i != first_num && i != second_num) {
            third = x[i];
            third_num = i;
        }
    cout << first << endl;
    cout << second << endl;
    cout << third << endl;
}