from collections.abc import Iterable def accum_dp(xs: Iterable, f, op, e, init: dict, *, is_reset=True): dp = init.copy() for x in xs: pp = {} if is_reset else dp.copy() dp, pp = pp, dp for fm_key, fm_val in pp.items(): for to_key, to_val in f(fm_key, fm_val, x): dp[to_key] = op(dp.get(to_key, e), to_val) return dp INF = 1 << 62 N = int(input()) T = int(input()) A = list(map(int, input().split())) def f(k, v, i): # key = 和 # val = +/* の 2 進数 if k + A[i] <= T: v_add = (v << 1) | 0 yield k + A[i], v_add if k * A[i] <= T: v_mul = (v << 1) | 1 yield k * A[i], v_mul def op(a, b): return min(a, b) init = {A[0]: 0} dp = accum_dp(range(1, N), f, op, INF, init) v = dp[T] ans = [] for i in range(N-1): if v & (1 << i): ans.append('*') else: ans.append('+') print(''.join(reversed(ans)))