#include <cstdio>
#include <vector>
#include <algorithm>

using namespace std;

bool fn(int a, int b) {
    if (a > b) return true;
    
    return false;
}


int main() {
	int N = 10;
	int height;
	vector<int> mountains;
	
	while (N--) {
	    scanf("%d", &height);
	    
	    mountains.push_back(height);
	}
	
    sort(mountains.begin(), mountains.end(), fn);
    
    printf("%d\n", mountains.at(0));
    printf("%d\n", mountains.at(1));
    printf("%d\n", mountains.at(2));
	
	return 0;
}