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:
#pragma GCC optimize ("O3")
#include <bits/stdc++.h>
#define loop(i,n) for(int i = 0;i < (n);i++)
#define all(A) A.begin(),A.end()
#define pb push_back
#define mp make_pair
#define sz(A) ((int)A.size())
typedef std::vector<int> vi;
typedef std::pair<int,int> pi;
typedef std::vector<pi> vp;
typedef long long ll;
#define popcnt(x) __builtin_popcount(x)
#define LSOne(x) ((x) & (-(x)))
#define print(A,t) cerr << #A << ": "; copy(all(A),ostream_iterator<t>(cerr," " )); cerr << endl
#define prArr(A,n,t)  cerr << #A << ": "; copy(A,A + n,ostream_iterator<t>(cerr," " )); cerr << endl
#define PRESTDIO() cin.tie(0),cerr.tie(0),ios_base::sync_with_stdio(0)
#define what_is(x) cerr << #x << " is " << x << endl
#define bit_lg(x) (assert(x > 0),__builtin_ffsll(x) - 1)
const double PI = acos(-1);
template<class A,class B>
std::ostream& operator << (std::ostream& st,const std::pair<A,B> p) {
	st << "(" << p.first << ", " << p.second << ")";
	return st;
}
using namespace std;

const ll INF = 2e16;
int n;
int A[1 << 20];
char S[5];


void simple(char c, string & res){
	res.push_back('0' + A[0]);
	for(int i = 1; i < n; i++) {
		res.push_back(c);
		res.push_back('0' + A[i]);
	}
	
}

void spit(int m, string & res){
	loop(i, m) {
		res.push_back('1');
		res.push_back('+');
	}
}


void work(deque<vi> & B, string & res){
	if(B.empty()) return;
	ll prod = 1;
	for(auto & b : B) {
		for(ll x : b){
			prod *= x;
			if(prod >= INF) break;
		}
		if(prod >= INF) break;
	}
	if(prod >= INF){
		for(auto & b : B) 
			for(ll x : b){
				res.push_back(x + '0');
				res.push_back('*');
			}
		res.pop_back();
		res.push_back('+');
		return;
	}
	assert(sz(B) <= 128);
	
	static vector<ll> dp, P;
	static vi choice;
	dp.clear();
	dp.resize(sz(B) + 1, 0);
	P.resize(sz(B), 1);
	choice.resize(sz(B) + 1);
	for(int i = 0; i < sz(B); i++){
		P[i] = 1;
		for(int x : B[i])
			P[i] *= x;
	}

	for(int i = 0; i < sz(B); i++){
		ll & res = dp[i + 1];
		if(i & 1) {
			res = B[i].size() + dp[i];
			choice[i + 1] = i;
		} 
		ll h = 1;
		for(int j = i; j >= 0; j--){
			h *= P[j];	
			ll tmp = h + dp[j];
			if(tmp > res){
				res = tmp;
				choice[i + 1] = j - 1;
			}
		}	
	}
	static string out;
	out.clear();
	for(int i = sz(B) - 1; i >= 0; ){
		int j = choice[i + 1];
		bool first = true;	
		if(i == j) {
			spit(sz(B[i]), out);
			i--;
		} else {
			for(; i > j; i--){
				reverse(all(B[i]));
				for(int x : B[i]) {
					if(!first) out.push_back('*');
					first = false;
					out.push_back(x + '0');
				}
			}			
			out.push_back('+');
		}
	}
	while(!isdigit(out.back())) out.pop_back();
	reverse(all(out));
	for(char c : out) res.push_back(c);
	res.push_back('+');
}
void solve(vi & V, string & res){
	if(V.empty()) return;
	static deque<vi> aux;
	aux.clear();
	bool is_ones = true;
	for(int x : V){
		if(aux.empty()) {
			aux.emplace_back();
			is_ones = x == 1;
		}
		bool ct = x == 1;
		if(is_ones ^ ct){
			aux.emplace_back();
		} 
		is_ones = ct;
		aux.back().push_back(x);
	}
	int pref = 0, suff = 0;
	if(aux[0][0] == 1) {
		pref = aux[0].size();
		aux.pop_front();
	}
	if(!aux.empty() && aux.back()[0] == 1){
		suff = aux.back().size();
		aux.pop_back();
	}
	spit(pref, res);
	work(aux, res);
	spit(suff, res);
}

void solvePP(string & res){
	vi V;
	loop(i, n){
		if(A[i] == 0){
			solve(V, res);
			V.clear();
			res.push_back('0');
			res.push_back('+');
		} else {
			V.push_back(A[i]);
		}
	}
	solve(V, res);
}

void solveNP(string & res){
	res.push_back(A[0] + '0');
	for(int i = 1; i < n; i++){
		if(A[i] == 0) res.push_back('-');
		else res.push_back('*');
		res.push_back(A[i] + '0');
	}
	
}

int main(){
#ifdef HOME
	freopen("in.in", "r", stdin);
#endif
	scanf("%d", &n);
	loop(i, n) scanf("%d", A + i);
	scanf("%s", S);
	string ans;
	if(strlen(S) == 1) {
		simple(S[0], ans);
	} else if(strlen(S) == 2){
		bool has_prod = S[0] == '*' || S[1] == '*';
		bool has_add = S[0] == '+' || S[1] == '+';
		if(has_prod){
			if(has_add) solvePP(ans);
			else solveNP(ans);
		} else {
			simple('+', ans);
		}
	} else {
		solvePP(ans);
	}
	if(!isdigit(ans.back())) ans.pop_back();
	cout << ans << endl;
	return 0;
}