N = input() total = input() A = map(int, raw_input().split()) limits = [0 for _ in xrange(N)] limits[N-1] = total-A[N-1] for i in xrange(N-2, -1, -1): limits[i] = limits[i+1]-A[i] mem = {} def rec(p, acm, ops): if p >= N: return ops if acm == total else False if acm > limits[p]: return False a = rec(p+1, acm+A[p], ops+'+') if a: mem[(p, acm)] = a return a a = rec(p+1, acm*A[p], ops+'*') if a: mem[(p, acm)] = a return a return False print rec(1, A[0], '')