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

static void input(std::vector<int>& hills)
{
    int val = 0;
    
    if (0x00 == &hills) {
        std::cerr << "hills is null" << std::endl;
        exit (1);
    }
 
    while (std::cin >> val) {
        hills.push_back(val);
    }
}

static int getMax(std::vector<int>& hills)
{
    if (0x00 == &hills) {
        std::cerr << "hills is null" << std::endl;
        exit (1);
    }

    std::sort(hills.begin(), hills.end());
    int ret = hills.back();
    hills.pop_back();

    return ret;
}

int main()
{
    std::vector<int> vec;

    input(vec);
    for (int i = 0; i < 3; i++) {
        std::cout << getMax(vec) << std::endl;
    }

    return 0;
}