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

using namespace std;

int main()
{
	int a;
	vector<int> v;

	cin >> a;	v.push_back(a);
	cin >> a;	v.push_back(a);
	cin >> a;	v.push_back(a);
	cin >> a;	v.push_back(a);
	cin >> a;	v.push_back(a);
	sort(v.begin(), v.end());
	reverse(v.begin(), v.end());
	cout << v[0] << " " << v[1] << " " << v[2] << " " << v[3] << " " << v[4] << endl;
}

