def solve(): N = int(input()) Total = int(input()) A = list(map(int, input().split())) def backtrack(index, current_val, ops): if index == N - 1: return ops if current_val == Total else None next_num = A[index + 1] # Try '+' first to maintain lex order new_plus = current_val + next_num if new_plus <= Total: result = backtrack(index + 1, new_plus, ops + ['+']) if result is not None: return result # Try '*' if '+' doesn't work new_mul = current_val * next_num if new_mul <= Total: result = backtrack(index + 1, new_mul, ops + ['*']) if result is not None: return result return None result_ops = backtrack(0, A[0], []) print(''.join(result_ops)) solve()