import sys sys.setrecursionlimit(10**6) N = int(input()) Total = int(input()) A_list = list(map(int, input().split())) dp_list = {} S = "" def solve(i, j): global S if j > Total: return if (i, j) in dp_list: return if i == N: if j == Total: print(S) exit() return S += "+" solve(i+1, j+A_list[i]) S = S[:-1] S += "*" solve(i+1, j * A_list[i]) S = S[:-1] dp_list[(i, j)] = 1 return solve(1, A_list[0])