#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <cstring>
#include <climits>
#include <cmath>
#include <cfloat>

using namespace std;

int num[5];

int main()
{
	
	while(!cin.eof())
	{
		for( int i=0;i<5;i++)
		{
			cin >> num[i];
		}

		sort(num, num+5, greater<int>());

		cout << num[0] <<" "<< num[1] <<" "<< num[2] <<" "<< num[3]<<" "<< num[4] <<endl;
	}

	return 0;
}