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