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:
//Just have Patience + 1...
#include<bits/stdc++.h>
using namespace std;

#define tarzan ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define int long long 

int rr[] = {0, 1, 1, 1, 0, -1, -1, -1};
int cc[] = {1, 1, 0, -1, -1, -1, 0, 1};

const int mod = 1e9 + 7;
const int N = 300050;

int dp[N], from_dp[N];

signed main() {
    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);
    tarzan;
    int test = 1;
    //cin >> test;
    while(test--) {
        int n;
        cin >> n;

        int a[n];
        for(int i = 0; i < n; i++) {
            cin >> a[i];
        }

        string s;
        cin >> s;
        sort(s.begin(), s.end());

        if(s == "*+-") s = "*+";
        if(s == "+-") s = "+";

        if((int)s.size() == 1) {
            cout << a[0];
            for(int i = 1; i < n; i++) {
                cout << s[0] << a[i];
            }
            continue;
        }

        if(s == "*-") {
            cout << a[0];
            for(int i = 1; i < n; i++) {
                if(a[i] == 0) {
                    cout << '-';
                }
                else cout << '*';
                cout << a[i];
            }
            continue;
        }

        function<string(int, int)> solve = [&](int left_idx, int right_idx) {
            string tempA = "", tempB = "", ans = "";
            while(left_idx <= right_idx && a[left_idx] == 1) {
                tempA += "1+";
                left_idx++;
            } 

            while(right_idx >= left_idx && a[right_idx] == 1) {
                tempB += "+1";
                right_idx--;
            }

            if(left_idx > right_idx) {
                tempA.pop_back();
                return tempA;
            }
            // else if(left_idx == right_idx) {
            //     tempA.push_back(char('0' + a[left_idx]));
            //     return (tempA + tempB);
            // }

            int product = 1;
            for(int idx = left_idx; idx <= right_idx; idx++) {
                product *= a[idx];
                if(product > N) {
                    break;
                }
            }

            if(product > N) {
                for(int idx = left_idx; idx <= right_idx; idx++) {
                    ans.push_back(char('0' + a[idx]));
                    if(idx != right_idx) {
                        ans += "*";
                    }
                }
                return tempA + ans + tempB;
            }

            for(int idx = left_idx; idx <= right_idx; idx++) {
                if(a[idx] == 1) {
                    dp[idx] = (idx == left_idx ? 0 : dp[idx - 1]) + a[idx];
                    from_dp[idx] = idx - 1;
                    continue;
                }

                int cur = 1;
                for(int jdx = idx; jdx >= left_idx; jdx--) {
                    cur = cur * a[jdx];
                    if((jdx ? dp[jdx - 1] : 0) + cur > dp[idx]) {
                        dp[idx] = (jdx ? dp[jdx - 1] : 0) + cur;
                        from_dp[idx] = jdx - 1;
                    }
                }
            }

            int idx = right_idx;
            while(idx != left_idx - 1) {
                for(int jdx = idx; jdx > from_dp[idx]; jdx--) {
                    ans.push_back(char(a[jdx] + '0'));
                    if(jdx > from_dp[idx] + 1) ans += "*";
                }
                ans += "+";
                idx = from_dp[idx];
            }
            ans.pop_back();
            reverse(ans.begin(), ans.end());

            return tempA + ans + tempB;
        };

        vector<int> zeros;
        int left_idx = -1;
        zeros.push_back(left_idx);
        for(int i = 0; i < n; i++) {
            if(a[i] == 0) {
                zeros.push_back(i);
            }
        }
        zeros.push_back(n);

        int K = zeros.size();
        vector<string> ans;
        for(int idx = 1; idx < K; idx++) {
            int left_idx = zeros[idx - 1] + 1;
            int right_idx = zeros[idx] - 1;

            if(left_idx < right_idx) {
                ans.push_back(solve(left_idx, right_idx));
            }
            else if(left_idx == right_idx) {
                string haha = "";
                haha.push_back(char('0' + a[left_idx]));
                ans.push_back(haha);
            }

            if(idx < K - 1) ans.push_back("0");
        }

        K = ans.size();

        for(int i = 0; i < K; i++) {
            cout << ans[i];
            if(i < K - 1) cout << '+';
        }
    }
    return 0;
}