#include<iostream>
using namespace std;
int main(){
	int a,b,c,d,t;
	cin>>a>>b>>c>>d;
	if(a>b){
		t=a;
		a=b;
		b=t;
		
	}
	if(b>c){
		t=b;
		b=c;
		c=t;
	}
	//d最大
	if(c>d){
		t=c;
		c=d;
		d=t;
	}
	if(a>b){
		t=a;
		a=b;
		b=t;
		
	}
	//abc中c最大
	if(b>c){
		t=b;
		b=c;
		c=t;
	}
	//ab中b最大
	if(a>b){
		t=a;
		a=b;
		b=t;
		
	}
	//相邻的2个数差值为2,且其中有一个数是奇数
	if(a+2==b&&b+2==c&&c+2==d&&a % 2 != 0){
		cout<<a<<"+2="<<b<<endl;
		cout<<b<<"+2="<<c<<endl;
		cout<<c<<"+2="<<d<<endl;
	}else{
		cout<<d<<" "<<c<<" "<<b<<" "<<a<<endl;
	}
}

/**************************************************************
	Problem: 1046
	User: admin
	Language: C++
	Result: Accepted
	Time:8 ms
	Memory:2072 kb
****************************************************************/