#include <stdio.h>
int main(void){
    int a=0,b=0,c=0,n,t;
    while(scanf("%d",&n)){
        if(n>a)t=n,n=a,a=t;
        if(n>b)t=n,n=b,b=t;
        if(n>c)c=n;
    }
    printf("%d\n%d\n%d\n",a,b,c);
    return 0;
}