from collections import deque from functools import lru_cache N = int(input()) T = int(input()) A = tuple(map(int, input().split())) stk = deque() @lru_cache def rec(i, x): if i == N and x == T: res = ''.join(map(str, stk)) print(res) exit() elif i == N or x > T: return stk.append('+') rec(i + 1, x + A[i]) stk.pop() stk.append('*') rec(i + 1, x * A[i]) stk.pop() rec(1, A[0])