#include <bits/stdc++.h>

#define ln                 '\n'
#define all(dat)           dat.begin(), dat.end()
#define loop(i, to)        for (int i = 0; i < to; ++i)
#define cont(i, to)        for (int i = 1; i <= to; ++i)
#define circ(i, fm, to)    for (int i = fm; i <= to; ++i)
#define foreach(i, dat)    for (__typeof(dat.begin()) i = dat.begin(); i != dat.end(); ++i)

typedef long long          num;

using namespace std;

const int nsz = 1e5;
const num inf = 1e9;
int n, a[nsz + 5];
char s[5], op[nsz + 5];

int inline mul(int a, int b) {
	num r = (num) a * b;
	return min(inf, r);
}

int inline add(int a, int b) {
	num r = a + b;
	return min(inf, r);
}

void inline assign(int el, int er) {
	static int b[nsz + 5], c[nsz + 5], fm[nsz + 5], pre[nsz + 5], suf[nsz + 5];
	int prod = 1, n = 0;
	circ (i, el, er) {
		prod = mul(prod, a[i]);
		if (prod == inf) {
			circ (i, el, er - 1) op[i] = '*';
			circ (i, el, er - 1) {
				if (a[i] > 1) break;
				op[i] = '+';
			}
			for (int i = er; i >= el + 1; --i) {
				if (a[i] > 1) break;
				op[i - 1] = '+';
			}
			return;
		}
	}
	circ (i, el, er - 1) op[i] = '+';
	circ (i, el, er - 1) if (a[i] > 1 && a[i + 1] > 1) op[i] = '*';
	circ (i, el, er) {
		if (a[i] == 1) ++c[n];
		else b[++n] = a[i], c[n] = 0, fm[n] = i;
	}
	if (!n) return;
	pre[1] = suf[1] = pre[n] = suf[n] = 0;
	circ (i, 2, n) pre[i] = pre[i - 1] + c[i - 1] + b[i - 1];
	for (int i = n - 1; i >= 1; --i) suf[i] = suf[i + 1] + c[i] + b[i + 1];
	num mx = -inf, pl = -1, pr = -1;
	for (int l = 1; l <= n; ++l) {
		num prod = 1;
		for (int r = l; r <= n; ++r) {
			prod *= b[r];
			num cur = pre[l] + suf[r] + prod;
			if (cur > mx) mx = cur, pl = fm[l], pr = fm[r];
		}
	}
	circ (i, pl, pr - 1) op[i] = '*';
}

void inline solve(int k) {
	if (k == 1 || k == 3) {
		printf("%d", a[1]);
		circ (i, 2, n) printf("+%d", a[i]);
	} else if (k == 2) {
		printf("%d", a[1]);
		circ (i, 2, n) printf("-%d", a[i]);
	} else if (k == 4) {
		printf("%d", a[1]);
		circ (i, 2, n) printf("*%d", a[i]);
	} else if (k == 6) {
		int p = -1;
		cont (i, n) if (a[i] == 0) { p = i; break; }
		printf("%d", a[1]);
		circ (i, 2, n) printf("%c%d", "*-"[i == p], a[i]);
	} else {
		for (int l = 1, r = 1; r <= n; ++r) {
			if (a[r] == 0) op[r - 1] = op[r] = '+';
			if ((a[r] == 0 && l <= r - 1) || r == n) assign(l, r - (a[r] == 0));
			if (a[r] == 0) l = r + 1;
		}
		printf("%d", a[1]);
		circ (i, 2, n) printf("%c%d", op[i - 1], a[i]);
	}
}

bool inline find(char *s, char c) {
	int n = strlen(s);
	loop (i, n) if (s[i] == c) return 1;
	return 0;
}

int main() {
	scanf("%d", &n);
	cont (i, n) scanf("%d", &a[i]);
	scanf("%s", s);
	int k = find(s, '+') | (find(s, '-') << 1) | (find(s, '*') << 2);
	solve(k);
}