import sys sys.setrecursionlimit(10**6) N = int(input()) Total = int(input()) A_list = list(map(int, input().split())) answer_list = [] def solve(i, j, operator): if i == N: if j == Total: answer_list.append(operator.copy()) return if A_list[i]+j <= Total: temp = operator.copy() temp.append("+") solve(i+1, j+A_list[i], temp) if A_list[i]*j <= Total: temp = operator.copy() temp.append("*") solve(i+1, j * A_list[i], temp) solve(1, A_list[0], []) [print(i, end="") for i in sorted(answer_list)[-1]] print("")