n = int(input()) x = int(input()) A = list(map(int, input().split())) ope = [] memo = set() def dfs(t, tot): if t == n: if tot == x: print(*ope, sep="") exit() return if t + tot * n in memo: return if tot + A[t] <= x: ope.append("+") dfs(t + 1, tot + A[t]) ope.pop() if tot * A[t] <= x: ope.append("*") dfs(t + 1, tot * A[t]) ope.pop() memo.add(t + tot * n) dfs(1, A[0])