n = input() total = input() a = map(int, raw_input().split()) dic = {a[0]:''} for value in a[1:]: next_dic = {} for key, operators in dic.iteritems(): next_key = key + value if next_key <= total: next_operators = operators + '+' if next_key in next_dic: next_dic[next_key] = max(next_dic[next_key], next_operators) else: next_dic[next_key] = next_operators next_key = key * value if next_key <= total: next_operators = operators + '*' if next_key in next_dic: next_dic[next_key] = max(next_dic[next_key], next_operators) else: next_dic[next_key] = next_operators dic = next_dic print dic[total]