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:
// 2020.12.13
// Code by LTb
// #pragma GCC optimize(2)
#include <bits/stdc++.h>
using namespace std;
// #define int long long
#define debug puts("QwQ");
inline int read(){
    int x=0,f=1;
    char ch;
    while(ch<'0'||ch>'9') {if(ch=='-')f=-1;ch=getchar();}
    while(ch>='0'&&ch<='9') {x=x*10+ch-'0';ch=getchar();}
    return f*x;
}

inline char readch(){
	char ch=getchar();
	while (ch==' '||ch=='\n') ch=getchar();
	return ch;
}

inline string readstr(){
	char ch=getchar();
	string ans="";
	while (ch==' '||ch=='\n') ch=getchar();
	while (ch!=' '&&ch!='\n') {ans+=ch;ch=getchar();}
	return ans;
}
inline void chmax(int &x,int y){x=max(x,y);}
inline void chmin(int &x,int y){x=min(x,y);}

const int MAXN=100005;
int n;
int a[MAXN];
bool Plus,Minus,Multiple;
int dp[MAXN],bel[MAXN];
char ans[MAXN];
int nex[MAXN];
int P=1e7;

void sol1(){
	for (int i=2;i<=n;i++)
		if (Plus) ans[i]='+';
		else ans[i]='-';
}

void sol2(){
	for (int i=2;i<=n;i++)
		ans[i]='*';
}

void sol3(){
	int pos=0;
	for (int i=1;i<=n;i++)
		if (!pos && a[i]==0) pos=i;

	for (int i=2;i<=n;i++){
		if (i==pos) ans[i]='-';
		else ans[i]='*';
	}
}

void init(){
	int cur=0;
	for (int i=n;i>=1;i--){
		nex[i]=cur;
		if (a[i]!=1) cur=i;
	}
}

void foo(int l,int r){
	int cnt=1;
	dp[l-1]=0;
	for (int i=l;i<=r;i++){
		if (cnt<P) cnt*=a[i];
		dp[i]=bel[i]=0;
		// cout<<i<<' '<<nex[i]<<endl;
	}

	if (cnt>=P){
		for (int i=l+1;i<=r;i++)
			ans[i]='*';
		return ;
	}

	for (int i=l;i<=r;i++){
		cnt=1;
		for (int j=i;j<=r && j;j=nex[j]){
			cnt*=a[j];
			if (dp[i-1]+cnt>dp[j]){
				dp[j]=dp[i-1]+cnt;
				bel[j]=i-1;
			}
		}
		// cout<<dp[i]<<' ';
	}

	int cur=r;
	while (cur>=l){
		int tmp=bel[cur];
		ans[tmp+1]='+';
		for (int i=tmp+2;i<=cur;i++)
			ans[i]='*';

		cur=tmp;
	}
}

void sol4(){
	init();
	for (int i=1;i<=n;i++){
		if (a[i]==0){
			ans[i+1]=ans[i]='+';
			continue;
		}

		int cur=i;
		while (cur<n && a[cur+1]!=0) cur++;

		int l=i,r=cur;
		while (l<=r && a[l]==1) ans[++l]='+';
		while (l<=r && a[r]==1) ans[r--]='+';
		if (l<=r) foo(l,r);
		i=cur;
	}
}

void print(){
	cout<<a[1];
	for (int i=2;i<=n;i++)
		cout<<ans[i]<<a[i];
	cout<<endl;
}

signed main()

{
	n=read();
	for (int i=1;i<=n;i++)
		a[i]=read();

	string allowed=readstr();
	for (auto i:allowed){
		if (i=='+') Plus=true;
		else if (i=='-') Minus=true;
		else Multiple=true;
	}

	if (!Multiple) sol1();
	else{
		if (!Plus && !Minus) sol2();
		else if (!Plus) sol3();
		else sol4();
	}

	print();
	return 0;
}