def calculate(count, num, gross, op): if op == '+': dp[num + gross] = dp[gross] + '+' gross += num else: dp[num * gross] = dp[gross] + '*' gross *= num if count >= N - 1: return if dp[total] == '' or len(dp[total]) < N - 1: calculate(count + 1, nums[count + 1], gross, '+') if dp[total] == '' or len(dp[total]) < N - 1: calculate(count + 1, nums[count + 1], gross, '*') N = int(input()) total = int(input()) nums = list(map(int, input().split())) dp = ['' for i in range(10000)] calculate(1, nums[1], nums[0], '+') if dp[total] == '' or len(dp[total]) < N - 1: calculate(1, nums[1], nums[0], '*') print(dp[total])