Problem: Barbara was late for her math class so as a punishment the teacher made her solve the task on a sheet of paper. Barbara looked at the sheet of paper and only saw n numbers a_1, a_2, …, a_n without any mathematical symbols. The teacher explained to Barbara that she has to place the available symbols between the numbers in a way that would make the resulting expression's value as large as possible. To find out which symbols were available the teacher has given Barbara a string s which contained that information.

<image>

It's easy to notice that Barbara has to place n - 1 symbols between numbers in total. The expression must start with a number and all symbols must be allowed (i.e. included in s). Note that multiplication takes precedence over addition or subtraction, addition and subtraction have the same priority and performed from left to right. Help Barbara and create the required expression!

Input

The first line of the input contains a single integer n (1 ≤ n ≤ 10^5) — the amount of numbers on the paper.

The second line of the input contains n integers a_1, a_2, …, a_n (0 ≤ a_i ≤ 9), where a_i is the i-th element of a.

The third line of the input contains the string s (1 ≤ |s| ≤ 3) — symbols allowed in the expression. It is guaranteed that the string may only consist of symbols "-", "+" and "*". It is also guaranteed that all symbols in the string are distinct.

Output

Print n numbers separated by n - 1 symbols — a mathematical expression with the greatest result. If there are multiple equally valid results — output any one of them.

Examples

Input


3
2 2 0
+-*


Output


2*2-0


Input


4
2 1 1 2
+*


Output


2+1+1+2

Note

The following answers also fit the first example: "2+2+0", "2+2-0", "2*2+0".

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
typedef signed long long ll;

#define _P(...) (void)printf(__VA_ARGS__)
#define FOR(x,to) for(x=0;x<(to);x++)
#define FORR(x,arr) for(auto& x:arr)
#define FORR2(x,y,arr) for(auto& [x,y]:arr)
#define ALL(a) (a.begin()),(a.end())
#define ZERO(a) memset(a,0,sizeof(a))
#define MINUS(a) memset(a,0xff,sizeof(a))
template<class T> bool chmax(T &a, const T &b) { if(a<b){a=b;return 1;}return 0;}
template<class T> bool chmin(T &a, const T &b) { if(a>b){a=b;return 1;}return 0;}
//-------------------------------------------------------

int N;
int A[101010];
string S;
int mask;

int pat[1<<20];
void out(vector<int> V) {
	if(V.size()==1) {
		cout<<V[0];
		return;
	}
	int i,j;
	int pre=0,suf=0;
	while(V.size()&&V.back()==1) suf++, V.pop_back();
	if(V.empty()) {
		FOR(i,suf) {
			if(i) cout<<"+";
			cout<<1;
		}
		return;
	}
	reverse(ALL(V));
	while(V.size()&&V.back()==1) pre++, V.pop_back();
	reverse(ALL(V));
	
	ll mul=1;
	FORR(v,V) {
		mul*=v;
		if(mul>10*V.size()) {
			FOR(i,pre) cout<<"1+";
			FOR(i,V.size()) {
				if(i) cout<<"*";
				cout<<V[i];
			}
			FOR(i,suf) cout<<"+1";
			return;
		}
	}
	
	vector<pair<int,vector<int>>> W;
	FORR(v,V) {
		if(W.empty()) {
			W.push_back({1,vector<int>()});
		}
		else if(v==1) {
			if(W.back().second[0]!=1) W.push_back({1,vector<int>()});
		}
		else {
			if(W.back().second[0]==1) W.push_back({1,vector<int>()});;
		}
		W.back().first*=v;
		W.back().second.push_back(v);
	}
	/*
	FORR(w,W) {
		cout<<w.first<<" ";
		FORR(v,w.second) cout<<v;
		cout<<endl;
	}
	*/
	assert(W.size()%2==1);
	int N=(W.size()-1)/2;
	int mask;
	FOR(mask,1<<N) {
		int sum=0;
		int cur=W[0].first;
		FOR(i,N) {
			if(mask&(1<<i)) {
				cur*=W[(i+1)*2].first;
			}
			else {
				sum+=cur+W[i*2+1].second.size();
				cur=W[(i+1)*2].first;
			}
		}
		pat[mask]=sum+cur;
	}
	
	mask=max_element(pat,pat+(1<<N))-pat;
	
	FOR(i,pre) cout<<"1+";
	
	FOR(i,W[0].second.size()) {
		if(i) cout<<"*";
		cout<<W[0].second[i];
	}
	FOR(i,N) {
		if(mask&(1<<i)) {
			FORR(v,W[i*2+1].second) cout<<"*"<<v;
			FORR(v,W[i*2+2].second) cout<<"*"<<v;
		}
		else {
			FORR(v,W[i*2+1].second) cout<<"+1";
			cout<<"+";
			FOR(j,W[i*2+2].second.size()) {
				if(j) cout<<"*";
				cout<<W[i*2+2].second[j];
			}
		}
	}
	
	FOR(i,suf) cout<<"+1";
}

void solve() {
	int i,j,k,l,r,x,y; string s;
	
	cin>>N;
	FOR(i,N) cin>>A[i];
	cin>>S;
	FORR(c,S) {
		if(c=='+') mask|=1;
		if(c=='*') mask|=2;
		if(c=='-') mask|=4;
	}
	
	if(mask==1||mask==5) {
		cout<<A[0];
		FOR(i,N-1) cout<<"+"<<A[i+1];
		cout<<endl;
		return;
	}
	if(mask==2) {
		cout<<A[0];
		FOR(i,N-1) cout<<"*"<<A[i+1];
		cout<<endl;
		return;
	}
	if(mask==4) {
		cout<<A[0];
		FOR(i,N-1) cout<<"-"<<A[i+1];
		cout<<endl;
		return;
	}
	if(mask==6) {
		cout<<A[0];
		FOR(i,N-1) {
			if(A[i+1]==0) cout<<"-"<<A[i+1];
			else cout<<"*"<<A[i+1];
		}
		cout<<endl;
		return;
	}
	
	vector<vector<int>> V(1),W;
	FOR(i,N) {
		if(A[i]==0) {
			V.push_back(vector<int>());
			V.back().push_back(0);
			V.push_back(vector<int>());
		}
		else {
			V.back().push_back(A[i]);
		}
	}
	FORR(v,V) if(v.size()) W.push_back(v);
	
	FOR(i,W.size()) {
		if(i) cout<<"+";
		out(W[i]);
	}
	cout<<endl;
	
	
}


int main(int argc,char** argv){
	string s;int i;
	if(argc==1) ios::sync_with_stdio(false), cin.tie(0);
	FOR(i,argc-1) s+=argv[i+1],s+='\n'; FOR(i,s.size()) ungetc(s[s.size()-1-i],stdin);
	cout.tie(0); solve(); return 0;
}