#include <stdio.h>

int main()
{
    int i,height,one = 0,two = 0,three = 0;
    for(i=0;i<10;++i){
        scanf("%d",&height);
        if(one < height){
            three = two;
            two = one;
            one = height;
        }else if(two < height){
            three = two;
            two = height;
        }else if(three <= height){
            three = height;
        }
    }
    printf("%d\n%d\n%d\n",one,two,three);
}