/*
Powered by 0736TuT
Code + Music + Games = Life
*/

#include<iostream>
#include<cstdio>
#include<algorithm>
#define MAXN 10010

typedef long long qwq;

using namespace std;

int scan(int *buf_tar)
{
    char buf_c=0; bool is_rev=0;
    while(buf_c!='-'&&(buf_c<'0'||buf_c>'9')) {buf_c=getchar(); if(buf_c==EOF) return EOF;}
    if(buf_c=='-') is_rev=1,buf_c=getchar();
    *buf_tar=0;
    while(buf_c>='0'&&buf_c<='9') {*buf_tar*=10; *buf_tar+=buf_c-'0'; buf_c=getchar();}
    if(is_rev) *buf_tar=-*buf_tar;
    return 0;
}

int cnt=0;
int num[MAXN];

inline bool cp(const int &,const int &);

int main()
{
    for(cnt=1;scan(&num[cnt])!=EOF;cnt++);
    sort(num+1,num+cnt,cp);
    printf("%d\n%d\n%d\n",num[1],num[2],num[3]);
    return 0;
}

inline bool cp(const int &a,const int &b)
{
    return a>b;
}