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>
using namespace std;
#define int int64_t

int BIG_NUM = 10000000000000000LL;

vector<int> readVec(int n) {
  vector<int> ans(n);
  for (int i = 0; i < n; i++) cin >> ans[i];
  return ans;
}

void print(const vector<int>& a, const string& signs) {
  int n = a.size();
  cout << a[0];
  for (int i = 1; i < n; i++) {
    cout << signs[i - 1] << a[i];
  }
}

void solveOneSign(const vector<int>& a, char sign) {
  int n = a.size();
  print(a, string(n - 1, sign));
}

void solveMinusMul(const vector<int>& a) {
  int n = a.size();
  string s = string(n - 1, '*');

  int firstZeroPos = -1;
  for (int i = 0; i < n; i++) {
    if (a[i] == 0) {
      firstZeroPos = i;
      break;
    }
  }
  if (firstZeroPos > 0) {
    s[firstZeroPos - 1] = '-';
  }

  print(a, s);
}

void solvePlusMulDp(const vector<int>& a) {
  int n = a.size();
  vector<int> dp(n);
  vector<int> bsp(n);  // after which pos is last PLUS in prefix.
  bsp[0] = -1;
  dp[0] = a[0];
  for (int i = 1; i < n; i++) {
    // cout << "i"<< i<<endl;
    if (a[i] == 1) {
      dp[i] = dp[i - 1] + 1;
      bsp[i] = i - 1;
    } else {
      dp[i] = 0;
      int prod = 1LL;
      for (int j = i - 1; j >= 0; j--) {
        // cout << "j"<< j<<endl;
        prod *= a[j + 1];
        if (dp[j] + prod > dp[i]) {
          dp[i] = dp[j] + prod;
          bsp[i] = j;
        }
      }

      prod *= a[0];
      if (prod > dp[i]) {
        dp[i] = prod;
        bsp[i] = -1;
      }
    }
  }

  string signs(n - 1, '*');
  int pp = n - 1;
  while (true) {
    // cout << "pp"<< pp <<endl;
    pp = bsp[pp];
    if (pp == -1) break;
    assert(pp >= 0 && pp <= n - 2);
    signs[pp] = '+';
  }
  print(a, signs);
}

void solvePlusMulNoZeros(const vector<int>& a) {
  int n = a.size();
  int prod = 1;
  bool tooLarge = false;
  for (int x : a) {
    assert(x != 0);
    prod *= x;
    if (prod >= BIG_NUM) {
      tooLarge = true;
      break;
    }
  }

  if (!tooLarge && prod == 1) {
    // All are ones - add them all up.
    solveOneSign(a, '+');
    return;
  }

  int onesBegin = 0;
  while (a[onesBegin] == 1) onesBegin++;
  int onesEnd = 0;
  while (a[n - onesEnd - 1] == 1) onesEnd++;
  vector<int> middle(a.begin() + onesBegin, a.end() - onesEnd);

  // Ones in beginning.
  for (int i = 0; i < onesBegin; i++) {
    cout << "1+";
  }

  // Middle.
  if (tooLarge) {
    // Multiply all.
    solveOneSign(middle, '*');
  } else {
    solvePlusMulDp(middle);
  }

  // Ones in end.
  for (int i = 0; i < onesEnd; i++) {
    cout << "+1";
  }
}

void solvePlusMul(const vector<int>& a) {
  int n = a.size();
  int i = 0;
  while (i != n) {
    if (a[i] == 0) {
      cout << "0";
      if (i != n - 1) cout << "+";
      i++;
    } else {
      vector<int> b;
      while (i != n && a[i] != 0) {
        b.push_back(a[i]);
        i++;
      }
      solvePlusMulNoZeros(b);
      if (i != n) cout << "+";
    }
  }
  vector<double> ldp;
}

int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);

  int n;
  cin >> n;
  vector<int> a = readVec(n);

  string s;
  cin >> s;
  if (s.length() == 1) {
    solveOneSign(a, s[0]);
  } else if (s.length() == 2) {
    if (s == "+-" || s == "-+") {
      solveOneSign(a, '+');
    } else if (s == "*-" || s == "-*") {
      solveMinusMul(a);
    } else {
      solvePlusMul(a);
    }
  } else {
    assert(s.length() == 3);
    solvePlusMul(a);
  }

  /*
  int casesNum;
  cin >> casesNum;
  for (int caseId = 1; caseId <= casesNum; caseId++) {
    solve();
  }*/
  return 0;
}