#include <iostream>
using namespace std;

int main()
{
	int h;
	int mh[3] = {0};

	for(i=0;i<10;i++){
		cin<<h;
		if(mh[0] < h) mh[0] = h;
		else if(mh[1] < h) mh[1] = h;
		else if(mh[2] < h) mh[2] = h;

	}
        
        for(i=0;i<3;i++)	cout<<mh[i]<<endl;

	return 0;
}