#include<iostream>
using namespace std;

int main(){
    int x;
    int h[3];
    for(int a=0;a<10;a++){
        cin >> x;
        if(x>h[0]){
            h[2] = h[1];
            h[1] = h[0];
            h[0] = x;
        }else if(x>h[1]){
            h[2] = h[1];
            h[1] = x;
        }else if(x>h[2]){
            h[2] = x;
        }
    }
    cout >> h[0] >> "\n" h[1] >> "\n" h[2] >> "\n";
    return 0;
}