
#include <iostream>

int main() {
	int array[5];

	for (auto& a : array)
	{
		std::cin >> a;
	}
	
	for (size_t i = 0; i < 4; i++)
	{
		int* pMax = &array[i];
		for (size_t j = i +1 ; j < 5; j++)
		{
			if (*pMax < array[j])
			{
				int tmp = *pMax;
				*pMax = array[j];
				array[j] = tmp;	
			}
		}
	}

	std::printf("%d %d %d %d %d\n", array[0], array[1], array[2], array[3], array[4]);

	return 0;
}
