#include <iostream>
#include <math.h>
#include <string>
#include <algorithm>
#include <vector>
using namespace std;
int kaijo(int n){
	int ans = 1;
	if (n != 0){
		for (int i = 0; i < n; i++){
			ans *= (n - i);
		}
	}
	else{
		ans = 1;
	}
	return ans;
}

int main(){
	int a[10];
	int ans;
	int max1 = 0;
	int max2 = 0;
	int max3 = 0;
	int j;
	for (int i = 0; i < 10; i++){
		cin >> a[i];
	}
	for (int b = 0; b < 3; b++){
		for (int i = 0; i < 10; i++){
			if (max1 < a[i]){
				max1 = a[i];
				j = i;
			}

		}
		cout << max1 << endl;
		max1 = 0;
		a[j] = 0;
	}

	return 0;
}