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

int main() {

	int yama[10];
	
	for(int i = 0; i <= 9; i++) {
	cin >> yama[i];
	}
	
	for(int i = 0; i <= 8; i++) {
		for(int j = i + 1; j <= 9; j++) {
			if(yama[i] < yama[j]){
				int x = yama[i];
				yama[i] = yama[j];
				yama[j] = x;
			}
		}
			
	}
	cout << yama[0] << endl << yama[1] << endl << yama[2] << endl;
	
    return 0;
}