#include <bits/stdc++.h>
using namespace std;
int main()
{
    int arr[10] , Max{0} , Max1{0} , Max2{0};

    for(int i{0};i<10;i++){
        cin>>arr[i];
    }

    Max = arr[0];

    Max1 = arr[0];

    Max2 = arr[0];

    for(int i{0};i<10;i++){
        if(arr[i]>Max){

            Max2 = Max1;

            Max1 = Max;

            Max = arr[i];
        }
        else if(arr[i] > Max1){
            Max2 = Max1;

            Max1 = arr[i];
        }
        else if(arr[i] > Max2){
            Max2 = arr[i];
        }
    }

    cout<<Max<<endl<<Max1<<endl<<Max2;

    return 0;
}
