#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");

}


