#include<iostream>
#include<string>
#include<vector>
#include<map>
using namespace std;
template <class YT>
class Array
{
	vector<YT> data;
public:
	Array()
	{
	}
	void add(YT value)
	{
		data.push_back(value);
	}
	void add()
	{
		YT p;
		data.push_back(p);
	}
	YT &operator[](int index)
	{
		if(index>=data.size())
		{
			YT element;
			data.push_back(element);
		}
		return data[index];
	}
	int size()
	{
		return data.size();
	}
	void sort()
	{
		for(int i=0;i<data.size()-1;i++)
			for(int j=i+1;j<data.size();j++)
				if(data[i]>data[j])
				{
					YT p=data[i];
					data[i]=data[j];
					data[j]=p;
				}
	}
};
int main()
{
	int n=10,p=0;
	Array<int> mount;
	for(int i=0;i<n;i++)
	{
		cin>>p;
		mount.add(p);
	}
	mount.sort();
	cout<<mount[mount.size()-1]<<endl;
	cout<<mount[mount.size()-2]<<endl;
	cout<<mount[mount.size()-3]<<endl;
	return 0;
}