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 <bits/stdc++.h>
#ifdef ONLINE_JUDGE
#define fast ios::sync_with_stdio(false), cin.tie(0), cout.tie(0)
#define N 100005
#define M 100005
#else
#define fast 
#define N 105
#define M 105
#endif
#define forn(i, n) for(int i = 0; i < (n); i++)
#define forab(i, a, b) for(int i = (a); i <= (b); i++)
#define forba(i, b, a) for(int i = (b); i >= (a); i--)
#define mk(x) (1<<(x)) // be conscious if mask x exceeds int
#define sz(x) ((int)x.size())
#define upperdiv(a,b) (a/b + (a%b>0))
#define mp(a,b) make_pair(a, b)
#define endl '\n'
#define lowbit(x) (x&-x)

using namespace std;
typedef long long ll;
typedef double db;

template<class T> bool ckmin(T& a, const T& b) { return a > b ? a = b, 1 : 0; }
template<class T> bool ckmax(T& a, const T& b) { return a < b ? a = b, 1 : 0; }

/** fast read **/
template <typename T>
inline void read(T &x) {
    x = 0; T fg = 1; char ch = getchar();
    while (!isdigit(ch)) {if (ch == '-') fg = -1;ch = getchar();}
    while (isdigit(ch)) x = x*10+ch-'0', ch = getchar();
    x = fg * x;
}
template <typename T, typename... Args>
inline void read(T &x, Args &... args) { read(x), read(args...); }
template <typename T>
inline void write(T x) {
    int len = 0; char c[21]; if (x < 0) putchar('-'), x = -x;
    do{++len; c[len] = x%10 + '0';} while (x /= 10);
    for (int i = len; i >= 1; i--) putchar(c[i]);
}
template <typename T, typename... Args>
inline void write(T x, Args ... args) { write(x), write(args...); }

struct Node{
    ll val, l, r;
};
ll INF = 1e7;
int a[N];
ll f[N]; int pre[N];
bool fmul, fplus, fminus;

int main() {
    int n; read(n);
    for (int i = 1; i <= n; i++)
        read(a[i]);
    string s; cin >> s;
    fmul = fplus = fminus = false;

    for (int i = 0; i < sz(s); i++)
        if (s[i] == '-')
            fminus = true;
        else if (s[i] == '+')
            fplus = true;
        else if (s[i] == '*')
            fmul = true;
    
    if (sz(s) == 1)
        for (int i = 1; i <= n; i++)
            printf("%d%c", a[i], i == n ? '\n' : s[0]);
    else if (!fmul)
        for (int i = 1; i <= n; i++)
            printf("%d%c", a[i], i == n ? '\n' : '+');
    else if (!fplus) {
        cout << a[1];
        for (int i = 2; i <= n; i++)
            printf("%c%d", a[i] == 0 ? '-' : '*', a[i]);
        puts("");
    }
    else {
        vector<char> ans(n+1, '+');
        int id = 1;
        while (id <= n) {
            while (id <= n && a[id] == 0) id++;
            if (id > n) break;
            int l = id;
            while (id <= n && a[id] != 0) id++;
            int r = id - 1;
            while (l <= r && a[l] == 1) l++;
            while (l <= r && a[r] == 1) r--;
            if (l > r) continue;

            ll mul = 1;
            for (int i = l; i <= r; i++) {
                mul *= (ll) a[i];
                if (mul > INF) break;
            }
            if (mul > INF) {
                for (int i = l + 1; i <= r; i++) ans[i] = '*';
                continue;
            }

            vector<Node> vec;
            int jd = l;
            while (jd <= r) {
                int tmpl = jd; ll val = 1;
                if (a[tmpl] > 1) {
                    for (; jd <= r && a[jd] > 1; jd++) {
                        if (jd != tmpl)
                            ans[jd] = '*';
                        val *= (ll)a[jd];
                    }
                }
                else {
                    for (; jd <= r && a[jd] == 1; jd++);
                    val = jd - tmpl;
                }
                vec.push_back(Node{val, tmpl, jd - 1});
            }
            int len = sz(vec);
            for (int i = 1; i <= len; i++) f[i] = -INF;

            for (int i = 1; i <= len; i++) {
                if (f[i] < f[i-1] + vec[i-1].val) {
                    pre[i] = i-1;
                    f[i] = f[i-1] + vec[i-1].val;
                }
                if (i & 1) {
                    ll val = 1;
                    for (int j = i; j <= len; j += 2) {
                        val *= vec[j-1].val;
                        if (f[j] < f[i-1] + val) {
                            pre[j] = i-1;
                            f[j] = f[i-1] + val;
                        }
                    }
                }
            }

            int x = len;
            for (; x; x = pre[x]) {
                int tmpl = pre[x] + 1, tmpr = x;
                if (tmpl >= tmpr)
                    continue;
                for (int i = vec[tmpl-1].l + 1; i <= vec[tmpr-1].r; i++)
                    ans[i] = '*';
            }
        }

        write(a[1]);
        for (int i = 2; i <= n; i++) {
            cout << ans[i];
            write(a[i]);
        }
        puts("");
    }
    return 0;
}
/*

*/