#include <iostream>
using namespace std;

int main() {
	int height[10];
	int first=0, second=0, third=0;
	int i=0;
	for (;i<10;i++)
		cin>>height[i];
	for (i=0;i<10;i++)
		if (first<=height[i])
			first=height[i];
	for (i=0;i<10;i++)
		if (second<=height[i]&&first>height[i])
			second=height[i];
	for (i=0;i<10;i++)
		if (third<=height[i]&&second>height[i])
			third=height[i];
	cout<<first<<endl<<second<<endl<<third<<endl;
	return 0;
}