#include<stdio.h>
#include<iostream>
using namespace std;

int main(){
    int i, f, s, t, h;
    f = -1;
    s = -1;
    t = -1;
    for (i = 0; i < 10; i++) {
        scanf("%d", &h);
        if (h > f) {
        	t = s;
        	s = f;
        	f = h;
        }
        else if (h > s) {
        	t = s;
        	s = h;
        }
        else if (h > t) {
        	t = h;
        }
    }
    printf("%d\n%d\n%d\n", f, s, t);
    return 0;
}
