#include <iostream>
#include <iomanip>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>
#include <sstream>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <numeric>
#include <cmath>
#include <climits>
#include <limits>
#include <cfloat>
#include <fstream>
using namespace std;
struct Tree{
	char node;
	struct Tree *left;
	struct Tree *right;
};

class Expression
{
public:
	vector <string> make_reverse_polish (int, int, int, int );
	void express_exp (string );
	int calc (string );
private:
};

struct Tree *talloc (void)
{
	return (new Tree);
}
struct Tree *make_tree (struct Tree *p, string& str)
{
	if (str.empty() ){
		return p;
	} // end if

	int n = str.length();

	p = talloc();
	p->node = str[n-1];

	str.erase(n-1);

	if (isdigit(p->node) ){
		p->left = NULL;
		p->right = NULL;
	}else{
		p->right = make_tree (p->right, str );
		p->left  = make_tree (p->left, str );
	} // end if

	return p;
}
void disp_node (Tree *curr )
{
	if (curr == NULL ){
		return;
	} // end if

	if (curr->node == '+' || curr->node == '-' || curr->node == '*'){
		cout << "(";
	} // end if

	disp_node (curr->left );
	if (curr->node == '+' || curr->node == '-' || curr->node == '*'){
		cout << ' ' << curr->node << ' ';
	}else{
		cout << curr->node;
	} // end if
	disp_node (curr->right );

	if (curr->node == '+' || curr->node == '-' || curr->node == '*'){
		cout << ")";
	} // end if
}

void delete_tree (Tree *curr )
{
	if (curr == NULL){
		return;
	} // end if

	delete_tree (curr->left );
	delete_tree (curr->right );
	delete curr;
}

vector <string> Expression::make_reverse_polish (int a, int b, int c, int d)
{
	const string exp[] = { "nn#n#n#", "nn#nn##", "nnn##n#", "nnn#n##", "nnnn###" };
	const string ope[] = { "+", "-", "*" };
	vector <string> ope3;
	vector <string> res ;
	int i,j,k;

	for (i = 0; i < 3*3*3; ++i){
		string t = "";
		t += ope[(i/9)%3]; t += ope[(i/3)%3]; t += ope[i%3];
		ope3.push_back(t);
	} // end for

	string num = "";
	num += a + '0'; num += b + '0'; num += c + '0'; num += d + '0';

	sort (num.begin(), num.end() );

	do{
		for (i = 0; i < sizeof (exp)/sizeof(exp[0]); ++i){
			string t = exp[i];
			int len = t.length();
			int m = 0;
			for (j = 0; j < len; ++j){
				if (t[j] == 'n'){
				 	t[j] = num[m];
					++m;
				} // end if
			} // end for
			
			for (j = 0; j < 3*3*3; ++j){
				string s = t;
				m = 0;
				for (k = 0; k < len; ++k){
					if(s[k] == '#'){
						s[k] = ope3[j][m];
						++m;
					} // end if
				} // end for
				res.push_back(s);
			} // end for
		} // end for

	}while (next_permutation (num.begin(), num.end() ) );

	return res;
}
int Expression::calc (string str)
{
	int len = str.length();
	int res = 0;
	stack <int> st;
	int i = 0;

	while (i < len){
		if( isdigit( str[i] ) ){
			int n = str[i] - '0';
			st.push(n);
		}else{	// operator come

			int y = st.top();
			st.pop();
			int x = st.top();
			st.pop();
			char c = str[i];
			int res = 0;

			switch (c){
				case '+':
					res = x + y; st.push(res); break;
				case '-':
					res = x - y; st.push(res); break;
				case '*':
					res = x * y; st.push(res); break;
			} // end switch	
		} // end if
		++i;
	} // end while

	res = st.top();

	return res;
}	
void Expression::express_exp (string exp )
{
	string res = "";
	Tree *root;
	root = NULL;

	root = make_tree (root, exp );
	
	disp_node (root );
	cout << endl;

	delete_tree (root );
}

int main()
{
//	cut here before submit 
//	freopen("testcase.expr", "r", stdin);

	Expression expression;
	string str = "";

	while (getline (cin, str ) ){
		int a, b, c, d;
		stringstream ss(str);
		ss >> a >> b >> c >> d;
		if (a == 0 && b == 0 && c == 0 && d == 0){
			break;
		} // end if		
		string res = "";
		vector <string> exp;
		int i,j;

		exp = expression.make_reverse_polish (a, b, c, d);
		for (j = 0; j < exp.size(); ++j){
			int ans = expression.calc (exp[j] );
			if (ans == 10){
				res = exp[j];
				exp.clear();
				break;
			} // end if
		} // end for
		if (res.empty()){
			cout << '0' << endl;
		}else{
			expression.express_exp (res );
//			cout << res << endl;
		} // end if

	} // end while

	return 0;
}

Measured memory_bytes: 0