#include<iostream>
#include<vector>
#include<algorithm>
#include<functional>

using namespace std;

int main()
{
	vector<int> data;
	int temp;

	for (int ix = 0; ix != 4; ++ix){
		cin >> temp;
		data.push_back(temp);
	}

	sort(data.begin(), data.end(), greater<int>());
	for (int ix = 0; ix != 3; ++ix)
		cout << data[ix] << endl;

	return 0;
}