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<iostream>
#include<cstdio>
#include<set>
#include<map>
#include<vector>
#include<cstring>
#include<string>
#include<cstdlib>
#include<algorithm>
#include<queue>
#include<iomanip>
#include<stack>
#include<cmath>

 
using namespace std;
 
 
#ifndef POJ
    #define Cpp11
#endif
 
#ifdef Cpp11
    #define _for(i,a,b) for(auto i = (a);i<(b);++i)
    #define _rep(i,a,b) for(auto i = (a);i<=(b);++i)
    #define _dep(i,a,b) for(auto i = (a);i>=(b);--i)
    #define mt(a,b,c) make_tuple(a,b,c) 
    #include<ctime>
    #include<random>
    #include<chrono>
    #include<limits>
    #include<complex>
    #include<unordered_set>
    #include<unordered_map>
    #include<cassert>
    #include<functional>
    #include<bitset>
    #define IO ios::sync_with_stdio(false);cout.tie(nullptr);cin.tie(nullptr);
#endif
 
#ifndef Cpp11
    #define _for(i,a,b) for(int i = (a);i<(b);++i)
    #define _rep(i,a,b) for(int i = (a);i<=(b);++i)
    #define _dep(i,a,b) for(int i = (a);i>=(b);--i)
    #define IO ios::sync_with_stdio(false);cout.tie(NULL);cin.tie(NULL);
#endif
 
 
using namespace std;


 
#define fr first
#define sc second
#define all(x) (x).begin(),(x).end()
#define pb push_back
#define pob pop_back
#define pf push_front
#define pof pop_front
#define sci(x) scanf("%d",&(x))
#define scl(x) scanf("%lld",&(x))
#define debugline fprintf(stderr,"-----------------------\n");
#define szint(x) ((int)(x).size())

 
#ifdef I128IO
typedef __int128 SPLL;
char buff[200];
template<typename T>
void read(T& o)
{
    o = 0;
    scanf("%s",buff);
    //printf("%s\n",buff);
    T f = 1;
    int i = 0;
 
    if(buff[0]=='-')i++,f = -1;
    for(;buff[i];++i)
    {
        o*=10,o+=buff[i]-'0';
    }
    o*=f;
}
 
template<typename T>
void write(T o)
{
    int len = 0;
    buff[0] = '0';
    if(o==0)
    {
        putchar('0');
        return;
    }
    int f = 1;
    if(o<0) f = -1;
    o*=f;
    for(;o;o/=10) buff[len++] = o%10+'0';
    if(f==-1) buff[len++] = '-';
    reverse(buff,buff+len);
    buff[len++] ='\0';
    printf("%s",buff);
}
#endif
 
#ifdef FIO
char buff[100];
template<typename T>
void read(T& o)
{
    o = 0;
    scanf("%s",buff);
    //printf("%s\n",buff);
    T f = 1;
    int i = 0;
    if(buff[0]=='-')i++,f = -1;
    for(;buff[i];++i)
    {
        o*=10,o+=buff[i]-'0';
    }
    o*=f;
}
template<typename T>
void write(T o)
{
    int len = 0;
    buff[0] = '0';
    if(o==0)
    {
        putchar('0');
        return;
    }
    int f = 1;
    if(o<0) f = -1;
    o*=f;
    for(;o;o/=10) buff[len++] = o%10+'0';
    if(f==-1) buff[len++] = '-';
    reverse(buff,buff+len);
    buff[len++] ='\0';
    printf("%s",buff);
}
#endif

#define OIreader


#ifdef OIreader
inline int read(){
    char ch; bool sign=0; int res=0;
    while(!isdigit(ch=getchar()))if(ch=='-')sign=1;
    while(isdigit(ch))res=res*10+(ch^48),ch=getchar();
    if(sign)return -res; else return res;
}
#endif

#define _Random_

#ifdef _Random_
    mt19937 __MT(chrono::system_clock::now().time_since_epoch().count());
#endif
 
#ifndef BigNumber
    typedef unsigned long long uLL;
    typedef long long LL;
    typedef long long ll;
    typedef pair<LL,LL> pLL;
    typedef vector<LL> vL;
    typedef vector<vL> vLL;
#endif



typedef vector<int> vi;
typedef vector<vi> vii;
typedef vector<vii> viii;
typedef pair<int,int> pii;


//68721573904

const int maxn = 100000+10;
const LL inf = 1e17;
const int MAXM = 3;
const int maxm = 1000000+10;
const LL MOD[] = {469762049,998244353,1004535809,1000000007};// For triple NTT
const int mod = 998244353;
const int apsz = 26;


int a[maxn],n,m;
char s[10];
char ans[maxn<<1];
char path[maxn<<1];
int has[255];
int b[maxn];
LL dp[maxn];
int pre[maxn];

inline void gao(int n)
{
    int L,R,pt,edpt;
    pt = 1;
    edpt = 2*n;
    L = 1,R = n;
    path[edpt+1] = 0;
    for(;L<=n&&b[L]==1;)
    {
        path[pt++] = '+';
        path[pt++] = '1';
        L++;
    }
    for(;R>L&&b[R]==1;)
    {
        path[edpt--] = '1';
        path[edpt--] = '+';
        R--;
    }
    LL val = 0;
    vi pos(1,L-1);
    _rep(i,L,R)
    {
        if(val==0)val = 1;
        if(b[i]!=1) pos.pb(i);
        val*=b[i];
        if(val>=inf)
        {
            break;
        }
    }
    if(val>=inf||val==0)
    {
        _rep(i,L,R)
        {
            path[pt++] = i==L?'+':'*';
            path[pt++] = b[i]+'0';
        }
        return;
    }
    dp[0] = 0;
    dp[1] = b[pos[1]];
    pre[1] = 0;
    _for(i,2,szint(pos))
    {
        LL val = b[pos[i]];
        dp[i] = -inf;
        for(int j = i-1;j>=0;j--)
        {
            if(dp[i]<dp[j]+val+pos[j+1]-pos[j]-1)
            {
                dp[i] = dp[j]+val+pos[j+1]-pos[j]-1;
                pre[i] = j;
            }
            val*=b[pos[j]];
        }
    }

    int now = szint(pos)-1;
    for(;now;)
    {
        int p = pre[now];
        _dep(i,now,p+2)
        {
            _dep(j,pos[i],pos[i-1]+1)
            {
                path[edpt--] = '0'+b[j];
                path[edpt--] = '*';
            }
        }
        path[edpt--] = '0'+b[pos[p+1]];
        path[edpt--] = '+';
        _dep(i,pos[p+1]-1,pos[p]+1)
        {
            path[edpt--] = '1';
            path[edpt--] = '+';
        }
        now = p;
    }
}


inline void solve()
{
    if(!has['+'])
    {
        for(int i = 1,j = 1;i<=n;)
        {
            if(a[i]==0)
            {
                if(i!=1) ans[j++] = m==1?s[0]:'-';
                ans[j++] = a[i++]+'0';
                for(;i<=n;++i) ans[j++] = m==1?s[0]:'*',ans[j++] = a[i]+'0';
                return;
            }
            else
            {
                if(i!=1) ans[j++] = m==1?s[0]:'*';
                ans[j++] = '0'+a[i++];
            }
        }
        return;
    }
    if(!has['*'])
    {
        ans[1] = a[1]+'0';
        for(int i = 2,j = 2;i<=n;++i)
        {
            ans[j++] = '+';
            ans[j++] = a[i]+'0';
        }
        return;
    }
    int l = 1;
    int len = 1;
    for(;l<=n&&a[l]==0;++l)
    {
        if(l!=1) ans[len++] = '+';
        ans[len++] = a[l]+'0';
    }
    for(;l<=n;)
    {
        int r = l+1;
        for(;r<=n&&a[r]!=0;)
        {
            r++;
        }
        _for(i,l,r) b[i-l+1] = a[i];
        gao(r-l);
        int st = 1;
        if(l==1)st = 2;
        for(;path[st];++st)
        {
            ans[len++] = path[st];
        }
        for(;r<=n&&a[r]==0;)
        {
            ans[len++] = '+';
            ans[len++] = '0'+a[r++];
        }
        l = r;
    }
}

int main(void)
{
    sci(n);
    _rep(i,1,n) sci(a[i]);
    scanf("%s",s);
    m = strlen(s);
    for(int o = 0;s[o];++o) has[s[o]] = 1;
    solve();
    printf("%s",ans+1);
    puts("");
    return 0;
}