#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
int main()
{
    int k[10005];
int i=0,a;
    while(scanf("%d",&a)==1)
{
k[i]=a;
i++;
}
sort(k,k+i+1);
printf("%d\n%d\n%d\n",k[i],k[i-1],k[i-2]);
return 0;
}
