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:
//CLOCKS_PER_SEC
using namespace std;
#include<bits/stdc++.h>
#define sqr(x) 1ll*(x)*(x)
//#define sort stable_sort
#define ll long long
#define mk make_pair
#define pb push_back
#define in insert
#define mtr(x,y,z) mk(mk(x,y),z)
#define fi first
#define se second
#define lch(x) ((x)<<1)
#define rch(x) (((x)<<1)|1)
#define all(x) (x).begin(),(x).end()
#define titose CLOCKS_PER_SEC
#define fpi(x) freopen(x,"r",stdin);
#define fpo(x) freopen(x,"w",stdout);
#define fprio fpi("in.txt");fpo("out.txt");
#define fast ios_base::sync_with_stdio(false);
inline void read(int &x){int v=0,f=1;char c=getchar();while (!isdigit(c)&&c!='-') c=getchar();if (c=='-') f=-1; else v=(c&15);while (isdigit(c=getchar())) v=(v<<1)+(v<<3)+(c&15);x=v*f;}
inline void read(ll &x){ll v=0ll,f=1ll;char c=getchar();while (!isdigit(c)&&c!='-') c=getchar();if (c=='-') f=-1; else v=(c&15);while (isdigit(c=getchar())) v=(v<<1)+(v<<3)+(c&15);x=v*f;}
inline void readc(char &x){char c;while (((c=getchar())==' ')||c=='\n');x=c;}
#define pii pair<int,int>
#define pll pair<ll,ll>
#define vi vector<int>
#define vl vector<ll>
#define si set<int>
#define sl set<ll>
#define mii map<int,int>
#define mll map<ll,ll>
#define msi map<string,int>
#define msl map<string,ll>
#define piii pair<int,pii >
#define piipi pair<pii,int>
#define plll pair<ll,pll >
#define pllpl pair<pll,ll>
#define pqi priority_queue<int>
#define pql priority_queue<ll>
#define npqi priority_queue<int,vector<int>,greater<int> >
#define npql priority_queue<ll,vector<ll>,greater<ll> >
#define forup(i,a,b) for ((i)=(a);(i)<=(b);(i)++)
#define fordo(i,a,b) for ((i)=(a);(i)>=(b);(i)--)
#define rep(i,x) forup ((i),1,(x))
#define repd(i,x) fordo ((i),(x),1)
#define rep0(i,x) forup ((i),0,((int)(x))-1)
#define rep0d(i,x) fordo ((i),((int)(x))-1,0)
#define itr iterator
#define fe(itcalc,c) for(__typeof((c).begin()) itcalc=(c).begin();itcalc!=(c).end();itcalc++)
#define NO {cout<<"NO";return 0;}
#define YES {cout<<"YES";return 0;}
#define y0 y000000000000000000000000000
#define y1 y111111111111111111111111111
#define j0 j000000000000000000000000000
#define j1 j111111111111111111111111111
#define cl0(a) memset((a),(0),(sizeof((a))))
#define clz(a) memset((a),(0x16),(sizeof((a))))
#define clf(a) memset((a),(-(0x16)),(sizeof((a))))
#define inf 0x3bbbbbbb
#define lnf 0x2bbbbbbbbbbbbbbbll
//#define sqrt divi
#define p2(i) (1ll<<(i))
#define readi read
#define readll read
/*************************************************/
int n,m,i,j,a[100005];
string st;
long long dp[100005],lst[100005];
int pre[100005];
char s[100005];
int getr(int x)
{
	while(a[x]>=1)x++;x--;
	while(a[x]==1){
		x--;s[x]='+';
	}
	return x;
}
void solve(int l,int r)
{
	long long prod=1;
	int i,j;
	forup(i,l,r){
		prod*=a[i];
		if(prod>=1000000000000000000ll){
			s[l-1]='+';
			return;
		}
	}
	dp[l-1]=0;
	forup(i,l,r){
		dp[i]=dp[i-1]+a[i];
		pre[i]=i;
	}
	forup(i,l,r){
		long long t=a[i];
		for(j=i-1;j>=l;j=lst[j]){
			t*=a[j];
			if(dp[j-1]+t>dp[i]){
				dp[i]=dp[j-1]+t;
				pre[i]=j;
			}
		}
	}
	while(r>=l){
		r=pre[r]-1;
		s[r]='+';
	}
}
int main()
{
	fast;cin>>n;rep(i,n)cin>>a[i];cin>>st;
	int t=0;rep0(i,st.size()){if(st[i]=='+')t|=1;if(st[i]=='-')t|=2;if(st[i]=='*')t|=4;}
	if(!(t&1)){
		rep(i,n-1){
			printf("%d",a[i]); 
			if(a[i+1]&&(t&4)){
				putchar('*');
			}
			else if(t&2){
				putchar('-');
			}
			else{
				putchar('*');
			}
		}printf("%d\n",a[n]);
		return 0;
	}
	if(!(t&4)){
		rep(i,n-1){
			printf("%d",a[i]); 
			putchar('+');
		}printf("%d\n",a[n]);
		return 0;
	}
	rep(i,n-1) s[i]='*';
	rep(i,n){
		if(a[i-1]==1)lst[i]=lst[i-1]; else lst[i]=i-1;
	}
	rep(i,n){
		if(a[i]>1){
			int t=getr(i);
			solve(i,t);
			i=t;
		}
		else{
			s[i-1]='+';
		}
	}
	rep(i,n-1){
		if(i>1&&a[i]==1&&a[i+1]==1&&s[i-1]=='+'){
			s[i]='+';
		}
	}
	rep(i,n-1){
		printf("%d",a[i]); 
		putchar(s[i]);
	}printf("%d\n",a[n]);
	return 0;
}