#include <iostream>
using namespace std;
int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    int x;
    int a = 0; int b = 0; int c = 0;
    while (cin >> x) {
        if (x > a) {
            c = b;
            b = a;
            a = x;
        }
        else if (x > b) {
            c = b;
            b = x;
        }
        else if (x > c)
            c = x;
    }
    cout << a << "\n" << b << "\n" << c << "\n";
}