#include<stdio.h>
#include<iostream>
#include<stdlib.h>
#include<string.h>
using namespace std;
const int inf = 0x3f3f3f;
int main()
{
    int a[20];
    bool vis[20];
    memset(vis,0,sizeof(vis));
    for(int i = 1 ; i <= 10 ; i++)
        scanf("%d",&a[i]);
    for(int k = 1 ; k <= 3 ; k++)
    {
        int maxx = -inf ,t;
        for(int i = 1 ; i <= 10 ; i++)
        {
            if(!vis[i] && maxx < a[i])
            {
                maxx = a[i];
                t = i;
            }
        }
        vis[t] = 1;
        printf("%d\n",maxx);
    }
}