#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;

int main(void){
    int i;
    vector<int> v;
    while(getline(cin, num)){
        v.push_back(num);
    }
    sort(v.begin(), v.end());
    for(int i = 1; i < 4; i++){
        cout << v[v.size - i] << endl;
    }
}