#include <stdio.h>
#include <iostream>

int nList[10],nGet,nSave[4]; // Variables

int main() {
    for (int i=0;i<10;i++){// Until 10 integers are set
        scanf("%i",&nGet); // Reads input
        if (nGet>0&&nGet<10000){ // Making sure the number inputted is greater than 0 and less than 10,000
        nList[i]=nGet; //
    }}


for (int sN=0;sN<3;sN++){

for (int rN=0;rN<10;rN++){

if (nList[rN]>nSave[sN]&&nSave[sN]==0){
    nSave[sN]=nList[rN];
    nList[rN]=0;}
if (nList[rN]>nSave[sN]&&nSave[sN]!=0){
        nSave[sN+1]=nSave[sN];
        nSave[sN]=nList[rN];
        nList[rN]=0;}

        }
    }


printf("%i\n%i\n%i",nSave[0],nSave[1],nSave[2]); // Shows the stored numbers
}