def main(): """ main """ N = int(input()) TOTAL = int(input()) AS = list(map(int, input().split())) # 演算子文字列, result q = [('', AS[0])] for optstr, total in q: if len(optstr) == N-1 and total == TOTAL: print(optstr) break elif len(optstr) == N-1: continue cur_a = AS[len(optstr)+1] if total+cur_a <= TOTAL: q.append((optstr + '+', total+cur_a)) if total*cur_a <= TOTAL: q.append((optstr + '*', total*cur_a)) main()