#include<iostream>
using namespace std;

int main(){
	int high[3] = {0}, height;
	while(cin >> height){
		if(high[0] < height){
			high[2] = high[1];
			high[1] = high[0];
			high[0] = height;
		}
		else if(high[1] < height){
			high[2] = high[1];
			high[1] = height;
		}
		else if(high[2] < height)
			high[2] = height;
	}
	for(int i = 0; i < 3; i++)
		cout << high[i] << endl;
    return 0;
}
