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 <string.h>
#include <assert.h>
#include <cassert>
#include <unordered_map>
#include <unordered_set>
#include <time.h>

#include <sstream>
#include <stdio.h>
#include <assert.h>
#include <math.h>
#include <bitset>
#include <algorithm>
#include <iostream>
#include <stack>
#include <queue>
#include <set>
 
#include <map>
#include <vector>
#include <string>
#include <stdlib.h>
#include <cassert>
//#include<bits/stdc++.h>

 
#define ll long long
#define ull unsigned long long
#define clr(x) memset(x,0,sizeof(x))
#define _clr(x) memset(x,-1,sizeof(x))
#define fr(i,a,b) for(int i = a; i < b; ++i)
#define frr(i,a,b) for(int i = a; i > b; --i)
#define pb push_back
#define sf scanf
 
#define pf printf
#define mp make_pair
#define pir pair<int,int>
#define N 211100
 
using namespace std;

int a[N];
int pre[N];
int first[N];
char op[N];
int n;
string s;
set<char> ops;

int pt[N];
ll dp[N];
bool check(char c){
	return ops.find(c) != ops.end();
}

void proc(int s, int e){
	if(s>e) return;
	while(s<e && a[s]==1){
		op[s] = '+';
		s++;
	}
	while(s<e && a[e]==1){
		op[e] = '+';
		e--;
	}

	//printf("s = %d e = %d\n",s,e);
	ll mul = 1;
	ll sum = 0;
	ll inf = 10000000;

	int last = s-1;
	int flag = 0;
	for(int i = s; i <= e&&!flag; ++i){
		dp[i] = dp[i-1]+a[i];
		pt[i] = i;
		pre[i] = last;
		if(a[i]!=1){
			mul = 1;
			for(int j = i; j >=s; j = pre[j]){
				mul *= a[j];
				//printf("i = %d j = %d mull = %lld dpj = %lld dp i = %lld\n",i,j,mul,dp[j-1],dp[i]);
				if(dp[i]< dp[j-1]+mul){
					dp[i] = dp[j-1]+mul;
					pt[i] = j;
				}
				if(dp[i]>inf) {
					flag = 1;
					break;
				}
			}
		}
		if(a[i]>1){
			last = i;
		}
	}
	//printf("s = %d,e = %d,flag = %d\n",s,e,flag);

	op[s]= '+';
	if(flag){
		for(int i = s+1; i <=e; ++i){
			op[i] = '*';
		}
	}
	else {
		for(int i = e; i >s; i = pt[i]-1){
			//printf("i = %d pt = %d\n",i,pt[i]);
			op[pt[i]]='+';
			for(int j = pt[i]+1; j <=i; ++j){
				op[j] = '*';
			}
		}
	}
}

int main(){
	srand(time(0));
	cin>>n;
	fr(i,1,n+1){
		cin>>a[i];
	}
	
	/*
	n = 100000;
	fr(i,0,n){
		a[i] = rand()%10;
	}
	*/
	
	cin>>s;
	sort(s.begin(), s.end());
	fr(i,0,s.size()){
		ops.insert(s[i]);
	}
	if(ops.size()==3){
		ops.erase('-');
	}
	if(ops.size()==1){
		fr(i,1,n+1){
			op[i] = *ops.begin();
		}
	}
	else {
		if(check('-')&&check('*')){
			fr(i,1,n+1){
				if(a[i]==0){
					op[i] = '-';
				}
				else{
					op[i] = '*';
				}
			}
		}
		else if(check('-')&&check('+')){
			fr(i,1,n+1){
				op[i] = '+';
			}
		}
		else {
			int last = 0;
			fr(i,1,n+1){
				if(a[i]==0){
					proc(last+1, i-1);
					op[i] = '+';
					last=i;
				}
			}
			proc(last+1, n);
		}
	}
	printf("%d",a[1]);
	fr(i,2,n+1){
		printf("%c%d",op[i],a[i]);
	}
	printf("\n");

}