import sys #sys.setrecursionlimit(n) import heapq import re import bisect import random import math import itertools from collections import defaultdict, deque from copy import deepcopy n = int(input()) total = int(input()) a = [int(i) for i in input().split()] ans = [''] * 50 memo = defaultdict(lambda:defaultdict(int)) def solve(i, t): if t == total and i == n - 1: print(''.join(ans)) sys.exit(0) if i >= n - 1 or t > total or memo[i][t]: return ans[i] = '+' solve(i + 1, t + a[i + 1]) ans[i] = '*' solve(i + 1, t * a[i + 1]) memo[i][t] = True return t = a[0] solve(0, t)