#include <iostream>
using namespace std;

int main () {

int a[3] = {-1, -1, -1};
int n;


    while(!cin.eof()) {

    cin >> n;

    if (n > a[0]) {
        a[2] = a[1];
        a[1] = a[0];
        a[0] = n;

    }

    else if (n < a[0] && n > a[1]) {
        a[2] = a[1];
        a[1] = n;
    }

    else if (n < a[1] && n > a[2]) {
        a[2] = n;
    }

    }

    for (int i = 0; i < 3; i++)
    cout << a[i] << endl;


    return 0;


}