#include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
#define rep(i,n) for(ll i=0;i<(ll)(n);i++)
#define all(a)  (a).begin(),(a).end()
#define pb push_back
#define INF (1e9+1)
//#define INF (1LL<<59)


int RPN(vector<char> v){
	stack<int> num;
	rep(i,v.size()){
		if(isdigit(v[i])){
			num.push(v[i]-'0');
		}else{
			if(num.size()<2) throw -1;
			int a,b;
			a = num.top(),num.pop();
			b = num.top();num.pop();
			if(v[i]=='+')num.push(a+b);
			if(v[i]=='-')num.push(a-b);
			if(v[i]=='*')num.push(a*b);
		}
	}
	if(num.size()!=1)throw -1;
	
	return num.top();
}

void printRPN(vector<char> v){
	stack<string> num;
	rep(i,v.size()){
		if(isdigit(v[i])){
			num.push(string(1,v[i]));
		}else{
			string a,b;
			a = num.top(),num.pop();
			b = num.top();num.pop();
			if(v[i]=='+')num.push("("+a+"+"+b+")");
			if(v[i]=='-')num.push("("+a+"-"+b+")");
			if(v[i]=='*')num.push("("+a+"*"+b+")");
		}
	}
	cout<<num.top()<<endl;
}

int main(){
	vector<char> v(4);
	while(cin>>v[0]>>v[1]>>v[2]>>v[3]){
		if(v[0]=='0'&&v[1]=='0'&&v[2]=='0'&&v[3]=='0')break;
		rep(plus,4){
			rep(minus,4){
				rep(mul,4){
					vector<char> tmp=v;
					if(plus+minus+mul!=3)continue;
					rep(i,plus)tmp.pb('+');
					rep(i,minus)tmp.pb('-');
					rep(i,mul)tmp.pb('*');
					
					sort(all(tmp));
					do{
						int res;
						try{
							res = RPN(tmp);
						}catch(int e){continue;}
						
						if(res==10){
							printRPN(tmp);
							goto next;
						}
					}while(next_permutation(all(tmp)));
				}
			}
		}
		cout<<0<<endl;
	next:;
	}
}