import collections def dfs(memo, a, j, s, t, res): if j == len(a) - 1: if s == t: return True else: return False if s in memo[j]: return False memo[j].add(s) if dfs(memo, a, j + 1, s + a[j + 1], t, res): res.append('+') return True if dfs(memo, a, j + 1, s * a[j + 1], t, res): res.append('*') return True else: return False n = int(input()) t = int(input()) a = [int(x) for x in input().split()] memo = [] for i in range(n): memo.append(set()) res = [] dfs(memo, a, 0, a[0], t, res) res.reverse() print(''.join(res))