#include <bits/stdc++.h>
#define FOR(i, a, b) for(int i = a; i < b; i++)
#define RFOR(i, a, b) for(int i = b; i >= a; i--)
#define REP(i, n) FOR(i, 0, n)
#define RREP(i, n) RFOR(i, 0, n)
#define VALL(v) v.begin(), v.end()
#define VSORT(v) sort(VALL(v));
using namespace std;
typedef vector<int> vi;

int main(){
    vi m(10);
    REP(i,10) cin >> m[i];
    VSORT(m);
    RFOR(i, 7, 9) cout << m[i] << endl;
}