//0018 Sorting Five Numbers
//®a,b,c,d,eªüÍ³ê½Æ«A~É®ñµÄoÍ·évOðì¬¹æ

//±ñÈsort()Ä×ÎIíéæ¤ÈâèAVÎÈ¢Æ¹¶áÈ¢

#include<iostream>
#include<algorithm>
#include<functional>
using namespace std;

int main(void)
{
	const int N = 5;
	int a[N];
	int i;

	//µå¤ªÈ¢©çÉÊÉ
	for(i = 0; i < N; i++)
		cin >> a[i];
	sort(a, a+N, greater<int>());
	for(i = 0; i < N; i++)
		(i ? cout<<' '<<a[i] : cout<<a[i]);
	cout << endl;

	/*
	//±êAVC++¾ÆRpCÅ«éÌÉñoµ½çRpCG[HçÁ½
	//[JNXÍn¹È¢ñ¾Á¯
	struct X
	{
		int operator()(int) { int a;cin >> a;return a;}
	};
	struct Y
	{
		int n;
		Y():n(0){}
		void operator()(int a) { (n++?cout<<' '<<a:cout<<a);}
	};
	transform(a, a+N, a, X());
	sort(a, a+N, greater<int>());
	for_each(a, a+N, Y());
	cout << endl;
	*/

	/*
	//±ê¾ÆAüÍÉEOFªKvÅAoÍÉXy[Xª½­ÈÁÄµÜ¤
	copy(istream_iterator<int>(cin), istream_iterator<int>(), a);
	sort(a, a+N, greater<int>());
	copy(a, a+N, ostream_iterator<int>(cout, " "));
	*/
	return 0;
}