#include <iostream>

using namespace std;

int main()
{
	int a[4];
	int i=0;
	int x;
	while (i < 4)
	{
		cin >> a[i];
		i++;
	}
	if (a[0] > a[1])
	{
		x = a[1];
		a[1] = a[0];
		a[0] = x;
	}
	if (a[0] > a[2])
	{
		x = a[2];
		a[2] = a[0];
		a[0] = x;
	}
	if (a[0] > a[3])
	{
		x = a[3];
		a[3] = a[0];
		a[0] = x;
	}
	if (a[1] > a[2])
	{
		x = a[2];
		a[2] = a[1];
		a[1] = x;
	}
	if (a[1] > a[3])
	{
		x = a[3];
		a[3] = a[1];
		a[1] = x;
	}
	if (a[2] > a[3])
	{
		x = a[3];
		a[3] = a[2];
		a[2] = x;
	}
	cout << a[0]<<" "<<a[1]<<" "<<a[2]<<" "<<a[3];
	return 0;
}